Merge branch 'master' of github.com:gnuboard/g4s

This commit is contained in:
whitedot
2013-02-27 10:26:37 +09:00
172 changed files with 5761 additions and 47 deletions

View File

@ -30,4 +30,7 @@ delete_cache_latest($tmp_bo_table);
// 게시판 폴더 전체 삭제
rm_rf(G4_DATA_PATH.'/file/'.$tmp_bo_table);
// syndication ping
include G4_BBS_PATH.'/syndi/include/include.adm.board_delete.inc.php';
?>

View File

@ -280,5 +280,8 @@ if ($fields) {
delete_cache_latest($bo_table);
// syndication ping
include G4_BBS_PATH.'/syndi/include/include.adm.board_form_update.php';
goto_url("./board_form.php?w=u&bo_table={$bo_table}&{$qstr}");
?>

View File

@ -53,7 +53,7 @@ if ($_POST['act_button'] == "선택수정") {
check_token();
// _BOARD_DELETE_ 상수를 선언해야 board_delete.inc.php 가 정상 작동함
define("_BOARD_DELETE_", TRUE);
define('_BOARD_DELETE_', true);
for ($i=0; $i<count($_POST['chk']); $i++) {
// 실제 번호를 넘김

View File

@ -66,5 +66,8 @@ if ($w == '') {
alert('제대로 된 값이 넘어오지 않았습니다.');
}
// syndication ping
include G4_BBS_PATH.'/syndi/include/include.adm.boardgroup_form_update.php';
goto_url('./boardgroup_form.php?w=u&amp;gr_id='.$gr_id.'&amp;'.$qstr);
?>

View File

@ -93,6 +93,9 @@ while ($row = sql_fetch_array($result))
// 파일테이블 행 삭제
sql_query(" delete from {$g4['board_file_table']} where bo_table = '$bo_table' and wr_id = '{$row['wr_id']}' ");
// syndication ping
include G4_BBS_PATH.'/syndi/include/include.bbs.delete.php';
$count_write++;
}
else

View File

@ -106,6 +106,9 @@ for ($i=count($tmp_array)-1; $i>=0; $i--)
// 파일테이블 행 삭제
sql_query(" delete from {$g4['board_file_table']} where bo_table = '$bo_table' and wr_id = '{$row['wr_id']}' ");
// syndication ping
include G4_BBS_PATH.'/syndi/include/include.bbs.delete_all.php';
$count_write++;
}
else

View File

@ -175,6 +175,9 @@ if ($sw == "move")
sql_query(" update {$g4['board_table']} set bo_count_write = bo_count_write - '$save_count_write', bo_count_comment = bo_count_comment - '$save_count_comment' where bo_table = '$bo_table' ");
}
// syndication ping
include G4_BBS_PATH.'/syndi/include/include.bbs.move_update.php';
$msg = '해당 게시물을 선택한 게시판으로 '.$act.' 하였습니다.';
$opener_href = './board.php?bo_table='.$bo_table.'&amp;page='.$page.'&amp;'.$qstr;

3
bbs/syndi/_common.php Normal file
View File

@ -0,0 +1,3 @@
<?php
include_once('../../common.php');
?>

View File

@ -0,0 +1,19 @@
<?PHP
// 타임존
$GLOBALS['syndi_time_zone'] = '+09:00';
// 데이타 인코딩
$GLOBALS['syndi_from_encoding'] = 'utf-8';
// 도메인 (http:// 제외, 마지막 / 제외)
$GLOBALS['syndi_tag_domain'] = $_SERVER['HTTP_HOST']; // 도메인을 직접 입력하시는게 좋습니다. (예: 'gnuboard.com')
// 도메인 연결 날짜(년도)
$GLOBALS['syndi_tag_year'] = '2010';
// 홈페이지 제목
$GLOBALS['syndi_homepage_title'] = $config['cf_title'];
// Syndication 출력 url (syndi_echo.php의 웹경로)
$GLOBALS['syndi_echo_url'] = G4_BBS_URL.'/syndi/syndi_echo.php';
?>

View File

@ -0,0 +1,440 @@
<?php
/**
* @file syndi.config.gnuboard4_utf8.php
* @author sol (ngleader@gmail.com)
* @brief syndication client functions for gnuboard4 utf-8
*
* Syndi_getSiteInfo : 사이트 정보
* Syndi_getChannelList : 사이트의 게시판
* Syndi_getArticleList : 게시물
* Syndi_getDeletedList : 삭제 게시물
* Syndi_getChannelNextPage : Syndi_getChannelList 의 페이징시 다음 페이지
* Syndi_getArticleNextPage : Syndi_getArticleList 의 페이징시 다음 페이지
* Syndi_getDeletedNextPage : Syndi_getDeletedList 의 페이징시 다음 페이지
*/
// include gnuboard config & lib
include '../config.php';
include '../'.G4_LIB_DIR.'/common.lib.php';
include '../'.G4_DATA_DIR.'/dbconfig.php';
$connect_db = sql_connect($mysql_host, $mysql_user, $mysql_password);
if(!$connect_db) return;
$GLOBALS['connect_db'] = $connect_db;
sql_select_db($mysql_db, $connect_db);
/**
* @brief 사이트 정보
**/
function Syndi_getSiteInfo($args)
{
$title = $GLOBALS['syndi_homepage_title'];
$tag = SyndicationHandler::getTag('site');
$oSite = new SyndicationSite;
$oSite->setId($tag);
$oSite->setTitle($title);
$oSite->setUpdated(date('YmdHis'));
// 홈페이지 주소
$link_alternative = sprintf('http://%s', $GLOBALS['syndi_tag_domain']);
$oSite->setLinkAlternative($link_alternative);
$link_self = sprintf('%s?id=%s&type=%s',$GLOBALS['syndi_echo_url'],$tag,$args->type);
$oSite->setLinkSelf($link_self);
return $oSite;
}
/**
* @brief Channel(게시판) 목록
**/
function Syndi_getChannelList($args)
{
global $g4;
$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 .= " order by b.gr_id,b.bo_table";
if($args->type=='channel')
{
$sql .= sprintf(" limit %s,%s", ($args->page-1)*$args->max_entry, $args->max_entry);
}
$result = sql_query($sql);
$channel_list = array();
while($row = sql_fetch_array($result))
{
$row['bo_subject'] = $row['bo_subject']?$row['bo_subject']:$row['bo_table'];
$tag = SyndicationHandler::getTag('channel',$row['bo_table']);
$oChannel = new SyndicationChannel;
$oChannel->setId($tag);
$oChannel->setTitle($row['bo_subject']);
$oChannel->setType('web');
$oChannel->setUpdated(date('YmdHis'));
$link_self = sprintf('%s?id=%s&type=%s',$GLOBALS['syndi_echo_url'],$tag,$args->type);
$oChannel->setLinkSelf($link_self);
// 게시판 웹주소
$link_alternative = sprintf('http://%s/bbs/board.php?bo_table=%s', $GLOBALS['syndi_tag_domain'], $row['bo_table']);
$oChannel->setLinkAlternative($link_alternative);
$channel_list[] = $oChannel;
}
sql_free_result($result);
return $channel_list;
}
/**
* @brief 모든 게시판의 게시물을 가져올때, 다음 게시판을 가져옴
**/
function _Syndi_getNextChannelId($channel_id=null)
{
global $g4;
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 .= " order by b.gr_id,b.bo_table limit 1";
$row = sql_fetch($sql);
sql_free_result($result);
return $row['bo_table'];
}
$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 .= " order by b.gr_id,b.bo_table limit 1";
$result = sql_query($sql);
if(mysql_num_rows($result)==0) return false;
$row = sql_fetch_array($result);
sql_free_result($result);
return $row['bo_table'];
}
/**
* @brief 게시물 목록
**/
function Syndi_getArticleList($args)
{
global $g4;
/*
$args->target_content_id //게시물 번호
$args->target_channel_id //게시판 번호
$args->start_time //기간
$args->end_time
$args->max_entry //출력 목록당 개수
$args->page //페이지 번호
$args->channel_id //모든 글 출력시 해당 게시판
*/
// all channel articles mysql 3.X, 4.0.X 에서는 sub query가 되지 않는다.
if(!$args->target_channel_id)
{
// $args->channel_id 가 없을 경우 첫번째 게시판을 가져온다.
if(!$args->channel_id) $args->channel_id = _Syndi_getNextChannelId();
$args->target_channel_id = $args->channel_id;
$article_list = Syndi_getArticleList($args);
unset($args->target_channel_id);
if(count($article_list)>0) return $article_list;
return array();
}
return _Syndi_getArticleList($args);
}
/**
* @brief 게시물 목록
**/
function _Syndi_getArticleList($args)
{
global $g4;
/*
$args->target_content_id //게시물 번호
$args->target_channel_id //게시판 번호
$args->start_time //기간
$args->end_time
$args->max_entry //출력 목록당 개수
$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";
$row = sql_fetch_array(sql_query($sql));
if($row['cnt']<1) return array();
$content_table = $t_board.'_'. $args->target_channel_id;
$category_table = $t_category.'_'. $args->target_channel_id;
// get article list
$where = " and wr_is_comment=0 ";
if($args->target_content_id) $where .= ' and wr_id='. mysql_real_escape_string($args->target_content_id);
if($args->start_time) $where .= ' and wr_datetime >= '. _getTime($args->start_time);
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;
$sql .= " order by wr_id desc ";
$sql .= sprintf(" limit %s,%s", ($args->page-1)*$args->max_entry, $args->max_entry);
$result = sql_query($sql);
$article_list = array();
while($row = sql_fetch_array($result))
{
$oArticle = new SyndicationArticle;
$tag = SyndicationHandler::getTag('article', $args->target_channel_id, $row['wr_id']);
$oArticle->setId($tag);
$oArticle->setTitle($row['wr_subject']);
$oArticle->setContent($row['wr_content']);
$oArticle->setType('web');
$oArticle->setCategory($row['ca_name']);
$oArticle->setName($row['wr_name']);
$oArticle->setEmail($row['wr_email']);
$oArticle->setUrl($row['wr_homepage']);
$oArticle->setPublished(date('YmdHis',_getTime($row['wr_datetime'])));
if($row['wr_last']) $oArticle->setUpdated(date('YmdHis',_getTime($row['wr_last'])));
// 게시판 웹주소
$link_channel_alternative = sprintf('http://%s/bbs/board.php?bo_table=%s',$GLOBALS['syndi_tag_domain'],$args->target_channel_id);
// 게시물 웹주소
$link_alternative = $link_channel_alternative . '&wr_id=' . $row['wr_id'];
$oArticle->setLinkChannel($tag);
$oArticle->setLinkAlternative($link_alternative);
$oArticle->setLinkChannelAlternative($link_channel_alternative);
// add list
$article_list[] = $oArticle;
}
sql_free_result($result);
return $article_list;
}
/**
* @brief 삭제 게시물 목록
* 삭제된 게시물에 대해 logging이 필요
**/
function Syndi_getDeletedList($args)
{
global $g4;
$table = $g4['syndi_log_table'];
// get delete article list
$where = '';
if($args->target_content_id) $where .= " and content_id='" . mysql_real_escape_string($args->target_content_id) . "'";
if($args->target_channel_id) $where .= " and bbs_id='" . mysql_real_escape_string($args->target_channel_id) . "'";
if($args->start_time) $where .= ' and delete_date >= '. $args->start_time;
if($args->end_time) $where .= ' and delete_date <= '. $args->end_time;
$sql = "select content_id, bbs_id, title, link_alternative, delete_date from $table where 1=1" . $where;
$sql .= " order by delete_date desc ";
$sql .= sprintf(" limit %s,%s", ($args->page-1)*$args->max_entry, $args->max_entry);
$result = sql_query($sql);
$deleted_list = array();
while($row = sql_fetch_array($result))
{
$oDeleted = new SyndicationDeleted;
$tag = SyndicationHandler::getTag('article', $row['bbs_id'], $row['content_id']);
$oDeleted->setId($tag);
$oDeleted->setTitle($row['title']);
$oDeleted->setUpdated($row['delete_date']);
$oDeleted->setDeleted($row['delete_date']);
if(substr($row['link_alternative'],0,2)=='./')
{
$row['link_alternative'] = 'http://' . $GLOBALS['syndi_tag_domain'] . substr($row['link_alternative'],1);
}
$oDeleted->setLinkAlternative($row['link_alternative']);
$deleted_list[] = $oDeleted;
}
sql_free_result($result);
return $deleted_list;
}
/**
* @brief Channel 목록 출력시 다음 페이지 번호
* return array('page'=>다음 페이지);
**/
function Syndi_getChannelNextPage($args)
{
global $g4;
$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;
$result = sql_query($count_sql);
$row = sql_fetch_array($result);
sql_free_result($result);
$total_count = $row['cnt'];
$total_page = ceil($total_count / $args->max_entry);
if($args->page >= $total_page)
{
return false;
}
else
{
return array('page'=>$args->page+1);
}
}
/**
* @brief 게시물 목록 출력시 다음 페이지
* return array('page'=>다음 페이지, 'channel_id'=>다음 게시판)
**/
function Syndi_getArticleNextPage($args)
{
global $g4;
// 사이트 모든 글
if(!$args->target_channel_id)
{
// channel_id 라는 변수로 게시판id를 받는다 (mysql 3.x,4.0.x을 위해)
if(!$args->channel_id)
{
$args->channel_id = _Syndi_getNextChannelId();
$args->all_channel = true;
}
$args->target_channel_id = $args->channel_id;
$obj = _Syndi_getArticleNextPage($args);
unset($args->target_channel_id, $args->all_channel);
return $obj;
}
else
{
return _Syndi_getArticleNextPage($args);
}
}
function _Syndi_getArticleNextPage($args)
{
global $g4;
$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";
if($row['cnt']==0) return false;
// get article list
$where = " and wr_is_comment=0 ";
if($args->target_content_id) $where .= ' and wr_id='. mysql_real_escape_string($args->target_content_id);
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;
$result = sql_query($count_sql);
$row = sql_fetch_array($result);
sql_free_result($result);
$total_count = $row['cnt'];
$total_page = ceil($total_count / $args->max_entry);
if($args->page >= $total_page)
{
if($args->all_channel)
{
$next_channel_id = _Syndi_getNextChannelId($args->target_channel_id);
if(!$next_channel_id) return false;
return array('page'=>1, 'channel_id'=>$next_channel_id);
}
else
{
return false;
}
}
else
{
return array('page'=>$args->page+1);
}
}
/**
* @brief 게시물 삭제 목록 출력시 다음 페이지 번호
**/
function Syndi_getDeletedNextPage($args)
{
global $g4;
$table = $g4['syndi_log_table'];
// get delete article list
$where = '';
if($args->target_content_id) $where .= " and no='" . mysql_real_escape_string($args->target_content_id) . "'";
if($args->target_channel_id) $where .= " and bbs_id='" . mysql_real_escape_string($args->target_channel_id) . "'";
if($args->start_time) $where .= ' and delete_date >= '. $args->start_time;
if($args->end_time) $where .= ' and delete_date <= '. $args->end_time;
$count_sql = "select count(*) as cnt from $table where 1=1" .$where;
$result = sql_query($count_sql);
$row = sql_fetch_array($result);
sql_free_result($result);
$total_count = $row['cnt'];
$total_page = ceil($total_count / $args->max_entry);
if($args->page >= $total_page)
{
return array('page'=>0);
}
else
{
return array('page'=>$args->page+1);
}
}
function _getTime($date)
{
return strtotime($date);
}
$oSyndicationHandler = &SyndicationHandler::getInstance();
$oSyndicationHandler->registerFunction('site_info','Syndi_getSiteInfo');
$oSyndicationHandler->registerFunction('channel_list','Syndi_getChannelList');
$oSyndicationHandler->registerFunction('channel_next_page','Syndi_getChannelNextPage');
$oSyndicationHandler->registerFunction('article_list','Syndi_getArticleList');
$oSyndicationHandler->registerFunction('article_next_page','Syndi_getArticleNextPage');
$oSyndicationHandler->registerFunction('deleted_list','Syndi_getDeletedList');
$oSyndicationHandler->registerFunction('deleted_next_page','Syndi_getDeletedNextPage');
?>

View File

@ -0,0 +1,29 @@
<?php
/**
* @file include.adm.board_delete.inc.php
* @author sol (ngleader@gmail.com)
* @brief 게시판 삭제시 Syndication Ping
* gnuboard4/adm/board_delete.inc.php 파일에 추가
* include '../syndi/include/gnuboard4_euckr/include.adm.board_delete.inc.php';
*/
if(!defined('_GNUBOARD_')) return;
if(!$tmp_bo_table) return;
$syndi_dir = realpath(dirname(__FILE__) .'/../');
// include config & Syndication Ping class
include_once $syndi_dir . '/config/site.config.php';
include_once $syndi_dir . '/libs/SyndicationHandler.class.php';
include_once $syndi_dir . '/libs/SyndicationPing.class.php';
$oPing = new SyndicationPing;
$oPing->setId(SyndicationHandler::getTag('site'));
$oPing->setType('channel');
// delete log
$_sql = "delete from {$g4['syndi_log_table']} where bbs_id='%s'";
sql_query(sprintf($_sql, $tmp_bo_table));
$oPing->request();
?>

View File

@ -0,0 +1,23 @@
<?php
/**
* @file include.adm.board_form_update.php
* @author sol (ngleader@gmail.com)
* @brief 게시판 삭제시 Syndication Ping
* gnuboard4/adm/board_form_update.php 파일에 추가
* include '../syndi/include/gnuboard4_euckr/include.adm.board_form_update.php';
*/
if(!defined('_GNUBOARD_')) return;
$syndi_dir = realpath(dirname(__FILE__) .'/../');
// include config & Syndication Ping class
include_once $syndi_dir . '/config/site.config.php';
include_once $syndi_dir . '/libs/SyndicationHandler.class.php';
include_once $syndi_dir . '/libs/SyndicationPing.class.php';
$oPing = new SyndicationPing;
$oPing->setId(SyndicationHandler::getTag('site'));
$oPing->setType('channel');
$oPing->request();
?>

View File

@ -0,0 +1,27 @@
<?php
/**
* @file include.adm.boardgroup_form_update.php
* @author sol (ngleader@gmail.com)
* @brief 게시판 삭제시 Syndication Ping
* gnuboard4/adm/board_delete.inc.php 파일에 추가
* include '../syndi/include/gnuboard4_euckr/include.adm.boardgroup_form_update.php';
*/
if(!defined('_GNUBOARD_')) return;
// group 수정이 아니면
if(!$_POST[gr_id]) return;
if($w!='u') return;
$syndi_dir = realpath(dirname(__FILE__) .'/../');
// include config & Syndication Ping class
include_once $syndi_dir . '/config/site.config.php';
include_once $syndi_dir . '/libs/SyndicationHandler.class.php';
include_once $syndi_dir . '/libs/SyndicationPing.class.php';
$oPing = new SyndicationPing;
$oPing->setId(SyndicationHandler::getTag('site'));
$oPing->setType('channel');
$oPing->request();
?>

View File

@ -0,0 +1,37 @@
<?php
/**
* @file include.bbs.delete.php
* @author sol (ngleader@gmail.com)
* @brief 글 삭제시 Syndication Ping
* gnuboard4/bbs/bbs.delete.php 파일에 추가
* include '../syndi/include/gnuboard4_euckr/include.bbs.delete.php';
*/
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";
$cnt_row = sql_fetch($sql);
if($cnt_row['cnt']<1) return;
$syndi_dir = realpath(dirname(__FILE__) .'/../');
// include config & Syndication Ping class
include_once $syndi_dir . '/config/site.config.php';
include_once $syndi_dir . '/libs/SyndicationHandler.class.php';
include_once $syndi_dir . '/libs/SyndicationPing.class.php';
$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_query(sprintf($_sql, $row['wr_id'], $bo_table, addslashes($subject_row['wr_subject']), sprintf($_link, $bo_table, $row['wr_id']), date('YmdHis')));
$oPing = new SyndicationPing;
$oPing->setId(SyndicationHandler::getTag('channel', $bo_table));
$oPing->setType('deleted');
$oPing->request();
?>

View File

@ -0,0 +1,36 @@
<?php
/**
* @file include.bbs.delete_all.php
* @author sol (ngleader@gmail.com)
* @brief 글 삭제시 Syndication Ping
* gnuboard4/bbs/bbs.delete_all.php 파일에 추가
* include '../syndi/include/gnuboard4_euckr/include.bbs.delete_all.php';
*/
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';
$cnt_row = sql_fetch($sql);
if($cnt_row['cnt']<1) return;;
$syndi_dir = realpath(dirname(__FILE__) .'/../');
// include config & Syndication Ping class
include_once $syndi_dir . '/config/site.config.php';
include_once $syndi_dir . '/libs/SyndicationHandler.class.php';
include_once $syndi_dir . '/libs/SyndicationPing.class.php';
$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_query(sprintf($_sql, $row['wr_id'], $bo_table, addslashes($subject_row['wr_subject']), sprintf($_link, $bo_table, $row['wr_id']), date('YmdHis')));
$oPing = new SyndicationPing;
$oPing->setId(SyndicationHandler::getTag('channel', $bo_table));
$oPing->setType('deleted');
$oPing->request();
?>

View File

@ -0,0 +1,39 @@
<?php
/**
* @file include.bbs.move_update.php
* @author sol (ngleader@gmail.com)
* @brief 글 등록/수정시 Syndication Ping
* gnuboard4/bbs/move_update.php 파일에 추가
* include '../syndi/include/gnuboard4_euckr/include.bbs.move_update.php';
*/
if(!defined('_GNUBOARD_')) return;
if($sw != 'move' && $sw != 'copy') return;
$syndi_dir = realpath(dirname(__FILE__) .'/../');
// include config & Syndication Ping class
include_once $syndi_dir . '/config/site.config.php';
include_once $syndi_dir . '/libs/SyndicationHandler.class.php';
include_once $syndi_dir . '/libs/SyndicationPing.class.php';
if($sw == "copy")
{
$oPing = new SyndicationPing;
$oPing->setId(SyndicationHandler::getTag('channel', $bo_table));
$oPing->setType('article');
$oPing->request();
unset($oPing);
}
for($i=0, $c=count($_POST['chk_bo_table']); $i<$c; $i++)
{
$oPing = new SyndicationPing;
$oPing->setId(SyndicationHandler::getTag('channel', $_POST['chk_bo_table'][$i]));
$oPing->setType('article');
$oPing->request();
unset($oPing);
}
?>

View File

@ -0,0 +1,42 @@
<?php
/**
* @file include.bbs.write_update.php
* @author sol (ngleader@gmail.com)
* @brief 글 등록/수정시 Syndication Ping
* gnuboard4/bbs/write_update.php 파일에 추가
* include '../syndi/include/gnuboard4_euckr/include.bbs.write_update.php';
*/
if(!defined('_GNUBOARD_')) return;
if(!$board) return;
// 비밀 게시판이면 pass
if($board['bo_use_secret'] && $secret) return;
// 비회원 사용자가 볼 수 없다면 pass
if($board['bo_list_level']>1 || $board['bo_view_level']>1) return;
if($w == 'u' && $wr && !$wr['wr_id']) return;
// 수정 대상 또는 신규 입력한 id가 있다면 ping을 보냄
if($wr['wr_id'] || $wr_id)
{
$syndi_dir = realpath(dirname(__FILE__) .'/../');
// include config & Syndication Ping class
include $syndi_dir . '/config/site.config.php';
include $syndi_dir . '/libs/SyndicationHandler.class.php';
include $syndi_dir . '/libs/SyndicationPing.class.php';
$oPing = new SyndicationPing;
$oPing->setId(SyndicationHandler::getTag('channel', $board['bo_table']));
$oPing->setType('article');
// if deleted
$_sql = "delete from {$g4['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();
}
?>

12
bbs/syndi/install.php Normal file
View File

@ -0,0 +1,12 @@
<?php
include_once('./_common.php');
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_query($sql, false);
alert('신디케이션 로그 테이블을 생성했습니다.', G4_URL);
?>

View File

@ -0,0 +1,137 @@
<?php
/**
* @class SyndicationArticle
* @author sol (ngleader@gmail.com)
* @brief Syndication Article 데이타 클래스
**/
class SyndicationArticle extends SyndicationObject
{
var $node = array('id','author','category','title','content','published','updated','link_alternative','link_channel','link_channel_alternative');
/**
* @brief URI Tag
**/
function setId($id)
{
$this->id = $id;
}
/**
* @brief Author name
**/
function setName($name)
{
$this->name = $name;
}
/**
* @brief Author email
**/
function setEmail($email)
{
$this->email = $email;
}
/**
* @brief Author homepage or blog
**/
function setUrl($url)
{
$this->url = $url;
}
/**
* @brief category or tag of content
**/
function setCategory($category)
{
$this->category = $category;
}
/**
* @brief Title of content
**/
function setTitle($title)
{
$this->title = $title;
}
/**
* @brief content
**/
function setContent($content)
{
$this->content = $content;
}
/**
* @brief Syndication Content Type으로 blog 경우'blog', 일반사이트 경우 'web'
**/
function setType($type='web')
{
$this->type = $type;
}
/**
* @brief Syndication Ping Url
**/
function setLinkSelf($link_self)
{
$this->link_self = $link_self;
}
/**
* @brief Channel Syndication Ping Url
**/
function setLinkChannel($link_channel)
{
$this->link_channel = $link_channel;
}
/**
* @brief Article(게시물) 접근 Url
**/
function setLinkAlternative($link_alternative)
{
$this->link_alternative = $link_alternative;
}
/**
* @brief Channel(게시판) 접근 Url
**/
function setLinkChannelAlternative($link_channel_alternative)
{
$this->link_channel_alternative = $link_channel_alternative;
}
/**
* @brief published time
* 'YYYYMMDDHHIISS' type
**/
function setPublished($published)
{
$this->published = $published;
}
/**
* @brief update time
* 'YYYYMMDDHHIISS' type
**/
function setUpdated($updated)
{
$this->updated = $updated;
}
function __toString()
{
$str = '';
foreach($this->node as $node){
$str .= $this->get($node);
}
return $str;
}
}
?>

View File

@ -0,0 +1,98 @@
<?php
/**
* @class SyndicationChannel
* @author sol (ngleader@gmail.com)
* @brief Syndication Channel(게시판) 데이타 클래스
**/
class SyndicationChannel extends SyndicationObject
{
var $node = array('id','title','type','summary','updated','link_rss','link_alternative','link_self','link_next_in_thread');
/**
* @brief URI Tag
**/
function setId($id)
{
$this->id = $id;
}
/**
* @brief Title of Channel
**/
function setTitle($title)
{
$this->title = $title;
}
/**
* @brief Type of Channel, web or blog
* blog 일경우 setLinkRss()를 등록해야 함
**/
function setType($type='web')
{
$this->type = $type;
}
/**
* @brief Summary of Channel
**/
function setSummary($summary)
{
$this->summary = $summary;
}
/**
* @brief Syndication Ping Url
**/
function setLinkSelf($link_self)
{
$this->link_self = $link_self;
}
/**
* @brief Channel(게시판) 접근 Url
**/
function setLinkAlternative($link_alternative)
{
$this->link_alternative = $link_alternative;
}
/**
* @brief Channel RSS Url (type이 blog면 필수)
**/
function setLinkRss($link_rss)
{
$this->link_rss = $link_rss;
}
/**
* @brief 다음 페이지 Url
**/
function setNextPage($obj)
{
if(!$obj) return;
if($obj['page']>0) $this->link_next_in_thread = $this->link_self . '&page='. $obj['page'];
}
/**
* @brief update time
* 'YYYYMMDDHHIISS' type
**/
function setUpdated($updated)
{
$this->updated = $updated;
}
function __toString()
{
$str = '';
foreach($this->node as $node){
$str .= $this->get($node);
}
return $str;
}
}
?>

View File

@ -0,0 +1,65 @@
<?php
/**
* @class SyndicationDeleted
* @author sol (ngleader@gmail.com)
* @brief Syndication Delete(Article) 데이타 클래스
**/
class SyndicationDeleted extends SyndicationObject
{
var $node = array('id','title','deleted','updated','link_alternative');
/**
* @brief URI Tag
**/
function setId($id)
{
$this->id = $id;
}
/**
* @brief Title of content
**/
function setTitle($title)
{
$this->title = $title;
}
/**
* @brief update time
* 'YYYYMMDDHHIISS' type
**/
function setUpdated($updated)
{
$this->updated = $updated;
}
/**
* @brief deleted time
* 'YYYYMMDDHHIISS' type
**/
function setDeleted($deleted)
{
$this->deleted = $deleted;
}
/**
* @brief Article(게시물) 접근 Url
**/
function setLinkAlternative($link_alternative)
{
$this->link_alternative = $link_alternative;
}
function __toString()
{
$str = '';
foreach($this->node as $node){
$str .= $this->get($node);
}
return $str;
}
}
?>

View File

@ -0,0 +1,346 @@
<?php
/**
* @class SyndicationHandler
* @author sol (ngleader@gmail.com)
* @brief Syndication 데이타 출력 핸들러
**/
class SyndicationHandler
{
var $param; // GET value
var $type; // 출력 내용 : article, deleted, channel, site
var $target; // 출력 대상 : article, channel, site
var $target_channel_id; // 출력 대상 channel(게시판) 번호 또는 유닉한 문자열
var $target_content_id; // 출력 대상 article(게시물) 번호 또는 유닉한 문자열
var $register_function = array();
function &getInstance()
{
if(!$GLOBALS['__SyndicationHandler__'])
{
$GLOBALS['__SyndicationHandler__'] = new SyndicationHandler();
}
return $GLOBALS['__SyndicationHandler__'];
}
/**
* @brief initialization.
**/
function SyndicationHandler()
{
}
/**
* @brief register function
* site_info
* article_list
* deleted_list
* channel_list
* article_next_page
* deleted_next_page
* channel_next_page
**/
function checkRegisteredFunctions()
{
$ids = array('site_info','article_list','deleted_list','channel_list','article_next_page','deleted_next_page','channel_next_page');
if(count($this->register_function) != count($ids)) return false;
foreach($this->register_function as $id => $func)
{
if(!in_array($id, $ids) || !is_callable($func))
{
return false;
}
}
return true;
}
function registerFunction($id, $func)
{
$this->register_function[$id] = $func;
}
function callFunction($id)
{
if(!isset($this->register_function[$id]) || !is_callable($this->register_function[$id])) return false;
return call_user_func($this->register_function[$id], $this->param);
}
/**
* @brief set GET Value.
**/
function setArgument($args=null)
{
if(!$args) $args = $_GET;
$obj = new stdClass;
$obj->id = $args['id'];
if($args['start-time']) $obj->start_time = SyndicationHandler::getDate($args['start-time']);
if($args['end-time']) $obj->end_time = SyndicationHandler::getDate($args['end-time']);
$obj->max_entry = $args['max_entry'];
if(!$obj->max_entry) $obj->max_entry = 100;
$obj->page = $args['page'];
if(!$obj->page) $obj->page = 1;
$obj->type = $args['type'];
// for getting all article on mysql 3.X, 4.0.X
if($args['channel_id']) $obj->channel_id = $args['channel_id'];
$this->param = $obj;
$this->parseTag();
}
/**
* @brief parsing id value(Tag URI)
**/
function parseTag()
{
// tag:domain,{YYYY}:site:
// tag:domain,{YYYY}:channel:{channel_id}
// tag:domain,{YYYY}:article:{channel_id}-{$article_id}
if(!preg_match('/^tag:([^,]+),([0-9]+):(site|channel|article)(.*)$/i',$this->param->id,$matches)) return;
$this->target = $matches[3];
$id = $matches[4];
if($id && $id{0}==':') $id = substr($id, 1);
switch($this->target)
{
case 'site':
break;
case 'channel':
if(!$id)
{
$this->target = $this->target_channel_id = $this->target_content_id = null;
return;
}
$this->target_channel_id = $id;
break;
case 'article':
if($id && strpos($id,'-')!==false)
{
list($this->target_channel_id, $this->target_content_id) = explode('-',$id);
if(!$this->target_content_id)
{
$this->target = $this->target_channel_id = $this->target_content_id = null;
return;
}
}
else
{
$this->target = $this->target_channel_id = $this->target_content_id = null;
return;
}
break;
}
if($this->target_channel_id) $this->param->target_channel_id = $this->target_channel_id;
if($this->target_content_id) $this->param->target_content_id = $this->target_content_id;
}
/**
* @brief xml for Syndication Server
**/
function getXML()
{
if(!$this->checkRegisteredFunctions()) return '';
switch($this->target)
{
// in site
case 'site':
// get Site info
$oSite = $this->callFunction('site_info');
if(!$oSite) return '';
$list_xml = '';
if(in_array($this->param->type,array('article','deleted','channel')))
{
$list = $this->callFunction($this->param->type . '_list');
if(!$list) $list = array();
$obj = $this->callFunction($this->param->type . '_next_page');
if($obj) $oSite->setNextPage($obj);
foreach($list as $oObject)
{
$list_xml .= $oObject->wrapEntry($oObject->__toString());
}
$xml = $oSite->__toString();
$xml = $oSite->wrapFeed($xml . $list_xml);
}
else
{
$xml = $oSite->__toString();
$xml = $oSite->wrapEntry($xml . $list_xml, true);
}
break;
// in channel
case 'channel':
// get Channel info
$oChannelList = $this->callFunction('channel_list');
if(!is_array($oChannelList) || count($oChannelList)==0) return '';
$oChannel = $oChannelList[0];
$list_xml = '';
if($this->target_channel_id && in_array($this->param->type,array('article','deleted')))
{
$list = $this->callFunction($this->param->type . '_list');
if(is_array($list) && count($list))
{
$obj = $this->callFunction($this->param->type . '_next_page');
if($obj) $oChannel->setNextPage($obj);
foreach($list as $oObject)
{
$list_xml .= $oObject->wrapEntry($oObject->__toString());
}
}
$xml = $oChannel->__toString();
$xml = $oChannel->wrapFeed($xml . $list_xml);
}
else
{
$xml = $oChannel->__toString();
$xml = $oChannel->wrapEntry($xml . $list_xml, true);
}
break;
// article info
case 'article':
if(in_array($this->param->type,array('article','deleted')))
{
$list = $this->callFunction($this->param->type . '_list');
}
if(!is_array($list) || count($list)==0) return '';
$oObject = $list[0];
$xml = $oObject->__toString();
$xml = $oObject->wrapEntry($xml, true);
break;
}
if(!$GLOBALS['syndi_from_encoding']) $GLOBALS['syndi_from_encoding'] = 'utf-8';
if($xml && strtolower($GLOBALS['syndi_from_encoding']) != 'utf-8' && function_exists('iconv'))
{
$xml = iconv($GLOBALS['syndi_from_encoding'], 'utf-8//IGNORE', $xml);
}
return $xml;
}
/**
* @brief Tag URI
**/
function getTag($type, $channel_id=null, $article_id=null)
{
$tag = sprintf('tag:%s,%s:%s'
,$GLOBALS['syndi_tag_domain']
,$GLOBALS['syndi_tag_year']
,$type);
if($type=='channel' && $channel_id)
{
$tag .= ':' . $channel_id;
}
else if($type=='article' && $channel_id && $article_id)
{
$tag .= ':' .$channel_id .'-' . $article_id;
}
return $tag;
}
/**
* @brief Timestamp 로 YYYYMMDDHHIISS 변환
**/
function getDate($timestamp)
{
$time = strtotime($timestamp);
if($time == -1) $time = SyndicationHandler::ztime(str_replace(array('-','T',':'),'',$timestamp));
return date('YmdHis', $time);
}
/**
* @brief YYYYMMDDHHIISS에서 Timestamp로 변환
**/
function getTimestamp($date)
{
$time = mktime(substr($date,8,2),substr($date,10,2),substr($date,12,2),substr($date,4,2),substr($date,6,2),substr($date,0,4));
$timestamp = date("Y-m-d\\TH:i:s", $time). $GLOBALS['syndi_time_zone'];
return $timestamp;
}
function ztime($str)
{
if(!$str) return;
$hour = (int)substr($str,8,2);
$min = (int)substr($str,10,2);
$sec = (int)substr($str,12,2);
$year = (int)substr($str,0,4);
$month = (int)substr($str,4,2);
$day = (int)substr($str,6,2);
if(strlen($str) <= 8)
{
$gap = 0;
}
else
{
$gap = SyndicationHandler::zgap();
}
return mktime($hour, $min, $sec, $month?$month:1, $day?$day:1, $year)+$gap;
}
function zgap()
{
$time_zone = $GLOBALS['syndi_time_zone'];
if($time_zone < 0) $to = -1; else $to = 1;
$t_hour = substr($time_zone, 1, 2) * $to;
$t_min = substr($time_zone, 3, 2) * $to;
$server_time_zone = date("O");
if($server_time_zone < 0) $so = -1; else $so = 1;
$c_hour = substr($server_time_zone, 1, 2) * $so;
$c_min = substr($server_time_zone, 3, 2) * $so;
$g_min = $t_min - $c_min;
$g_hour = $t_hour - $c_hour;
$gap = $g_min*60 + $g_hour*60*60;
return $gap;
}
function error($msg)
{
echo $msg;
exit;
}
}
?>

View File

@ -0,0 +1,104 @@
<?php
/**
* @class SyndicationObject
* @author sol (ngleader@gmail.com)
* @brief Syndication 데이타 타입의 상위 클래스
**/
class SyndicationObject
{
var $id;
var $title;
var $content;
var $summary;
var $author;
var $name;
var $email;
var $url;
var $published;
var $updated;
var $deleted;
var $type;
var $link_self;
var $link_alternative;
var $link_rss;
var $link_channel;
var $link_channel_alternative;
var $link_next_in_thread;
function SyndicationXml()
{
}
function get($node_name)
{
$node = array('id','author','name','email','url','title','type','summary','content','published','deleted','updated','link_rss','link_alternative','link_self','link_channel','link_channel_alternative','link_next_in_thread');
if(!in_array($node_name, $node)) return '';
if($node_name == 'author')
{
$str = "<author>\n";
$str .= $this->get('name');
$str .= $this->get('email');
$str .= $this->get('url');
$str .= "</author>\n";
return $str;
}
$value = $this->{$node_name};
if(!$value) return '';
if(strpos($node_name,'link_')!==false)
{
$type = str_replace('_','-',substr($node_name, strlen('link_')));
return "<link rel=\"".$type."\" href=\"".htmlspecialchars($value)."\" />\n";
}
if(in_array($node_name,array('published','deleted','updated')))
{
$value = $this->_getTime($value);
}
return sprintf("<%s>%s</%s>\n", $node_name, htmlspecialchars($value) ,$node_name);
}
function _getTime($time)
{
return SyndicationHandler::getTimestamp($time);
}
function wrapFeed($str)
{
$return = '<?xml version="1.0" encoding="utf-8"?>';
$return .= "\n";
$return .= '<feed xmlns="http://www.w3.org/2005/Atom">';
$return .= "\n";
$return .= $str;
$return .= "</feed>";
return $return;
}
function wrapEntry($str, $xml_info=false)
{
if($xml_info)
{
$return = '<?xml version="1.0" encoding="utf-8"?>';
$return .= "\n";
$return .= '<entry xmlns="http://www.w3.org/2005/Atom">';
$return .= "\n";
}
else
{
$return .= "<entry>\n";
}
$return .= $str;
$return .= "</entry>\n";
return $return;
}
}
?>

View File

@ -0,0 +1,105 @@
<?php
/**
* @class SyndicationPing
* @author sol (ngleader@gmail.com)
* @brief Syndication Ping Request 클래스
**/
class SyndicationPing
{
// Ping Server
var $ping_host = 'syndication.openapi.naver.com';
var $client;
var $type = 'article';
var $id;
var $start_time;
var $end_time;
var $max_entry;
var $page;
function setId($id)
{
$this->id = $id;
}
function setType($type)
{
$this->type = $type;
}
function setStartTime($start_time)
{
if($start_time)
{
$this->start_time = $this->_convertTime($start_time);
}
}
function setEndTime($end_time)
{
if($end_time)
{
$this->end_time = $this->_convertTime($end_time);
}
}
function _convertTime($time)
{
return str_replace('+','%2b',$time);
}
function setMaxEntry($max_entry)
{
if($max_entry > 0 && $max_entry <= 10000)
{
$this->max_entry = $max_entry;
}
}
function setPage($page)
{
if($page > 0 && $page <= 10000)
{
$this->page = $page;
}
}
function getBody()
{
$str = $GLOBALS['syndi_echo_url'];
$str .= '?id=' . $this->id;
$str .= '&type=' . $this->type;
if($this->start_time && $this->end_time)
{
$str .= '&start_time=' . $this->start_time;
$str .= '&end_time=' . $this->end_time;
}
if($this->max_entry) $str .= '&max_entry=' . $this->max_entry;
if($this->page) $str .= '&page=' . $this->page;
return 'link='.urlencode($str);
}
function request()
{
$body = $this->getBody();
if(!$body) return false;
$header = "POST /ping/ HTTP/1.0\r\n".
"User-Agent: request\r\n".
"Host: " . $this->ping_host . "\r\n".
"Content-Type: application/x-www-form-urlencoded\r\n".
"Content-Length: ". strlen($body) ."\r\n".
"\r\n".
$body;
$fp = @fsockopen($this->ping_host, '80', $errno, $errstr, 5);
if(!$fp) return false;
fputs($fp, $header);
fclose($fp);
return true;
}
}
?>

View File

@ -0,0 +1,74 @@
<?php
/**
* @class SyndicationSite
* @author sol (ngleader@gmail.com)
* @brief Syndication Site 정보 클래스
**/
class SyndicationSite extends SyndicationObject
{
var $node = array('id','title','link_self','link_alternative','link_next_in_thread','updated');
/**
* @brief URI Tag
**/
function setId($id)
{
$this->id = $id;
}
/**
* @brief Title of Site
**/
function setTitle($title)
{
$this->title = $title;
}
/**
* @brief Syndication Ping Url
**/
function setLinkSelf($link_self)
{
$this->link_self = $link_self;
}
/**
* @brief 접근 Url
**/
function setLinkAlternative($link_alternative)
{
$this->link_alternative = $link_alternative;
}
/**
* @brief 다음 페이지 Url
**/
function setNextPage($obj)
{
if(!$obj) return;
if($obj['page']>0) $this->link_next_in_thread = $this->link_self . '&page='. $obj['page'];
if($obj['channel_id']) $this->link_next_in_thread .= '&channel_id='. $obj['channel_id'];
}
/**
* @brief update time
* 'YYYYMMDDHHIISS' type
**/
function setUpdated($updated)
{
$this->updated = $updated;
}
function __toString()
{
$str = '';
foreach($this->node as $node){
$str .= $this->get($node);
}
return $str;
}
}
?>

View File

@ -0,0 +1,77 @@
<?php
/**
* @class SyndicationStatus
* @author sol (ngleader@gmail.com)
* @brief Syndication 상태 정보 클래스
**/
class SyndicationStatus
{
// Status Server
var $status_host = 'syndication.openapi.naver.com';
var $site;
function setSite($site)
{
$this->site = $site;
}
function request()
{
if(!$this->site) return false;
$header = "GET /status/?site=".$this->site." HTTP/1.0\r\n".
"Host: " . $this->status_host . "\r\n\r\n";
$fp = @fsockopen($this->status_host, '80', $errno, $errstr);
if(!$fp) return false;
$output = '';
fputs($fp, $header);
while(!feof($fp)){
$output .= fgets($fp, 1024);
}
fclose($fp);
$output = substr($output, strpos($output, "\r\n\r\n")+4);
return $this->_parse($output);
}
function _parse($data)
{
preg_match_all('@\<([a-z_0-9=\" ]+)\>([^\<]+)\</@', $data, $matches);
if(!$matches[2]) return false;
$output = array('article'=>array());
for($i=0,$c=count($matches[0]);$i<$c;$i++){
if(strpos($matches[1][$i], 'date="')!==false){
$date = substr($matches[1][$i],14,8);
$output['article'][$date] = $matches[2][$i];
}else{
$output[$matches[1][$i]] = $matches[2][$i];
}
}
return $output;
}
}
/*
$oStatus = new SyndicationStatus;
$oStatus->setSite('domain.com');
$output = $oStatus->request();
$output data fields
error : 0이 아닌 경우 에러
message : 에러 메세지
site_url : site url
site_name : site name
first_update : Syndication 서버에 처음 등록된 시간
last_update : Syndication 서버에 최근 갱신 시간
status : site 상태
visit_ok_count : ping 연속 성공 횟수
visit_fail_count : ping 실패 횟수
*/
?>

37
bbs/syndi/syndi_echo.php Normal file
View File

@ -0,0 +1,37 @@
<?php
/**
* @file syndi_echo.php
* @author sol (ngleader@gmail.com)
* @brief Print Syndication Data XML
*/
header("Content-Type: text/html; charset=UTF-8");
header("Pragma: no-cache");
if(version_compare(PHP_VERSION, '5.3.0') >= 0)
{
date_default_timezone_set(@date_default_timezone_get());
}
error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT);
$syndi_path = dirname(__FILE__);
// include class
include $syndi_path . '/libs/SyndicationHandler.class.php';
include $syndi_path . '/libs/SyndicationObject.class.php';
include $syndi_path . '/libs/SyndicationSite.class.php';
include $syndi_path . '/libs/SyndicationChannel.class.php';
include $syndi_path . '/libs/SyndicationArticle.class.php';
include $syndi_path . '/libs/SyndicationDeleted.class.php';
// config & custom func for site
include $syndi_path . '/config/site.config.php';
include $syndi_path . '/func/site.func.php';
$oSyndicationHandler = &SyndicationHandler::getInstance();
$oSyndicationHandler->setArgument();
echo $oSyndicationHandler->getXML();
?>

View File

@ -459,6 +459,8 @@ if ($w == '' || $w == 'r') {
}
}
// syndication ping
include G4_BBS_PATH.'/syndi/include/include.bbs.write_update.php';
//------------------------------------------------------------------------------
// 가변 파일 업로드
@ -610,5 +612,5 @@ delete_cache_latest($bo_table);
if ($file_upload_msg)
alert($file_upload_msg, G4_HTTPS_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;page='.$page.$qstr);
else
goto_url(G4_HTTPS_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;page='.$page.$qstr);
goto_url(G4_HTTPS_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.$qstr);
?>

View File

@ -408,16 +408,29 @@ if ($is_admin != 'super') {
//==============================================================================
// 스킨경로
//------------------------------------------------------------------------------
$board_skin_path = G4_SKIN_PATH.'/board/'.$board['bo_skin'];
$board_skin_url = G4_SKIN_URL.'/board/'.$board['bo_skin'];
$member_skin_path = G4_SKIN_PATH.'/member/'.$config['cf_member_skin'];
$member_skin_url = G4_SKIN_URL.'/member/'.$config['cf_member_skin'];
$new_skin_path = G4_SKIN_PATH.'/new/'.$config['cf_new_skin'];
$search_skin_path = G4_SKIN_PATH.'/search/'.$config['cf_search_skin'];
$connect_skin_path = G4_SKIN_PATH.'/connect/'.$config['cf_connect_skin'];
$poll_skin_path = G4_SKIN_PATH.'/poll/basic';
if (isset($_GET['skin_dir']))
$poll_skin_path = G4_SKIN_PATH.'/poll/'.$_GET['skin_dir'];
if (G4_IS_MOBILE) {
$board_skin_path = G4_MOBILE_PATH.'/'.G4_SKIN_DIR.'/board/'.$board['bo_skin'];
$board_skin_url = G4_SKIN_URL.'/board/'.$board['bo_skin'];
$member_skin_path = G4_MOBILE_PATH.'/'.G4_SKIN_DIR.'/member/'.$config['cf_member_skin'];
$member_skin_url = G4_SKIN_URL.'/member/'.$config['cf_member_skin'];
$new_skin_path = G4_MOBILE_PATH.'/'.G4_SKIN_DIR.'/new/'.$config['cf_new_skin'];
$search_skin_path = G4_MOBILE_PATH.'/'.G4_SKIN_DIR.'/search/'.$config['cf_search_skin'];
$connect_skin_path = G4_MOBILE_PATH.'/'.G4_SKIN_DIR.'/connect/'.$config['cf_connect_skin'];
$poll_skin_path = G4_MOBILE_PATH.'/'.G4_SKIN_DIR.'/poll/basic';
if (isset($_GET['skin_dir']))
$poll_skin_path = G4_SKIN_PATH.'/poll/'.$_GET['skin_dir'];
} else {
$board_skin_path = G4_SKIN_PATH.'/board/'.$board['bo_skin'];
$board_skin_url = G4_SKIN_URL.'/board/'.$board['bo_skin'];
$member_skin_path = G4_SKIN_PATH.'/member/'.$config['cf_member_skin'];
$member_skin_url = G4_SKIN_URL.'/member/'.$config['cf_member_skin'];
$new_skin_path = G4_SKIN_PATH.'/new/'.$config['cf_new_skin'];
$search_skin_path = G4_SKIN_PATH.'/search/'.$config['cf_search_skin'];
$connect_skin_path = G4_SKIN_PATH.'/connect/'.$config['cf_connect_skin'];
$poll_skin_path = G4_SKIN_PATH.'/poll/basic';
if (isset($_GET['skin_dir']))
$poll_skin_path = G4_SKIN_PATH.'/poll/'.$_GET['skin_dir'];
}
//==============================================================================

View File

@ -44,6 +44,7 @@ define('G4_LIB_DIR', 'lib');
define('G4_SKIN_DIR', 'skin');
define('G4_GCAPTCHA_DIR', 'gcaptcha');
define('G4_CKEDITOR_DIR', 'ckeditor');
define('G4_MOBILE_DIR', 'mobile');
// URL 은 브라우저상에서의 경로 (도메인으로 부터의)
if (G4_DOMAIN) {
@ -70,6 +71,7 @@ define('G4_JS_URL', G4_URL.'/'.G4_JS_DIR);
define('G4_SKIN_URL', G4_URL.'/'.G4_SKIN_DIR);
define('G4_GCAPTCHA_URL', G4_BBS_URL.'/'.G4_GCAPTCHA_DIR);
define('G4_CKEDITOR_URL', G4_BBS_URL.'/'.G4_CKEDITOR_DIR); // CKEDITOR 의 라이브러리 경로
define('G4_MOBILE_URL', G4_URL.'/'.G4_MOBILE_DIR);
// PATH 는 서버상에서의 절대경로
define('G4_ADMIN_PATH', G4_PATH.'/'.G4_ADMIN_DIR);
@ -80,6 +82,7 @@ define('G4_LIB_PATH', G4_PATH.'/'.G4_LIB_DIR);
define('G4_SKIN_PATH', G4_PATH.'/'.G4_SKIN_DIR);
define('G4_GCAPTCHA_PATH', G4_BBS_PATH.'/'.G4_GCAPTCHA_DIR);
define('G4_CKEDITOR_PATH', G4_BBS_PATH.'/'.G4_CKEDITOR_DIR);
define('G4_MOBILE_PATH', G4_PATH.'/'.G4_MOBILE_DIR);
//==============================================================================

View File

@ -2,6 +2,11 @@
define('_INDEX_', true);
include_once('./_common.php');
if (G4_IS_MOBILE) {
include_once(G4_MOBILE_PATH.'/index.php');
return;
}
// 초기화면 파일 경로 지정 : 이 코드는 가능한 삭제하지 마십시오.
if ($config['cf_include_index']) {
if (!@include_once($config['cf_include_index'])) {

View File

@ -734,4 +734,20 @@ CREATE TABLE IF NOT EXISTS `g4s_uniqid` (
PRIMARY KEY (`uq_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `g4s_syndi_log`
--
DROP TABLE IF EXISTS `g4s_syndi_log`;
CREATE TABLE IF NOT EXISTS `g4s_syndi_log` (
`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;
-- --------------------------------------------------------

View File

@ -197,6 +197,7 @@ fwrite($f, "\$g4['scrap_table'] = G4_TABLE_PREFIX.'scrap'; // 게시글 스크
fwrite($f, "\$g4['visit_table'] = G4_TABLE_PREFIX.'visit'; // 방문자 테이블\n");
fwrite($f, "\$g4['visit_sum_table'] = G4_TABLE_PREFIX.'visit_sum'; // 방문자 합계 테이블\n");
fwrite($f, "\$g4['uniqid_table'] = G4_TABLE_PREFIX.'uniqid'; // 유니크한 값을 만드는 테이블\n");
fwrite($f, "\$g4['syndi_log_table'] = G4_TABLE_PREFIX.'syndi_log'; // 네이버 신디케이션 컨텐츠 삭제 로그 테이블\n");
fwrite($f, "?>");
fclose($f);

View File

@ -1613,8 +1613,9 @@ function convert_charset($from_charset, $to_charset, $str)
// mysql_real_escape_string 의 alias 기능을 한다.
function escape_trim($field)
{
if ($field)
return mysql_real_escape_string(trim($field));
if ($field) {
return mysql_real_escape_string(@trim($field));
}
}

5
mobile/_head.php Normal file
View File

@ -0,0 +1,5 @@
<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
include_once(G4_MOBILE_PATH.'/head.php');
?>

5
mobile/_tail.php Normal file
View File

@ -0,0 +1,5 @@
<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
include_once(G4_MOBILE_PATH.'/tail.php');
?>

151
mobile/head.php Normal file
View File

@ -0,0 +1,151 @@
<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
include_once(G4_PATH.'/head.sub.php');
include_once(G4_LIB_PATH.'/latest.lib.php');
include_once(G4_LIB_PATH.'/outlogin.lib.php');
include_once(G4_LIB_PATH.'/poll.lib.php');
include_once(G4_LIB_PATH.'/visit.lib.php');
include_once(G4_LIB_PATH.'/connect.lib.php');
include_once(G4_LIB_PATH.'/popular.lib.php');
?>
모바일 헤드
<header id="hd">
<div id="to_content"><a href="#container">본문 바로가기</a></div>
<h1><?=$config['cf_title']?></h1>
<div id="hd_wrapper">
<div id="logo">
<a href="<?=G4_URL?>"><img src="<?=G4_IMG_URL?>/logo.jpg" alt="처음으로" width="53" height="37"></a>
</div>
<fieldset id="schall">
<legend>사이트 내 전체검색</legend>
<form name="fsearchbox" method="get" action="<?=G4_BBS_URL?>/search.php" onsubmit="return fsearchbox_submit(this);">
<input type="hidden" name="sfl" value="wr_subject||wr_content">
<input type="hidden" name="sop" value="and">
<input type="text" id="schall_stx" name="stx" title="검색어" maxlength="20"><input type="image" id="schall_submit" src="<?=G4_IMG_URL?>/btn_search.jpg" width="24" height="24" alt="검색">
</form>
<script>
function fsearchbox_submit(f)
{
if (f.stx.value.length < 2) {
alert("검색어는 두글자 이상 입력하십시오.");
f.stx.select();
f.stx.focus();
return false;
}
// 검색에 많은 부하가 걸리는 경우 이 주석을 제거하세요.
var cnt = 0;
for (var i=0; i<f.stx.value.length; i++) {
if (f.stx.value.charAt(i) == ' ')
cnt++;
}
if (cnt > 1) {
alert("빠른 검색을 위하여 검색어에 공백은 한개만 입력할 수 있습니다.");
f.stx.select();
f.stx.focus();
return false;
}
return true;
}
</script>
</fieldset>
<ul id="snb">
<li>
<a href="<?=G4_BBS_URL?>/current_connect.php" id="snb_cnt">
<img src="<?=G4_IMG_URL?>/snb_cnt.jpg" alt="">
현재접속자 <?=connect(); // 현재 접속자수 ?>
</a>
</li>
<li>
<a href="<?=G4_BBS_URL?>/new.php" id="snb_new">
<img src="<?=G4_IMG_URL?>/snb_new.jpg" alt="">
새글
</a>
</li>
<? if ($is_member) { ?>
<? if ($is_admin) { ?>
<li>
<a href="<?=G4_ADMIN_URL?>" id="snb_adm">
<img src="<?=G4_IMG_URL?>/snb_admin.jpg" alt="">
관리자
</a>
</li>
<? } ?>
<li>
<a href="<?=G4_BBS_URL?>/member_confirm.php?url=<?=G4_BBS_URL?>/register_form.php" id="snb_modify">
<img src="<?=G4_IMG_URL?>/snb_modify.jpg" alt="">
내 정보
</a>
</li>
<li>
<a href="<?=G4_BBS_URL?>/logout.php" id="snb_logout">
<img src="<?=G4_IMG_URL?>/snb_logout.jpg" alt="">
로그아웃
</a>
</li>
<? } else { ?>
<li>
<a href="<?=G4_BBS_URL?>/register.php" id="snb_join">
<img src="<?=G4_IMG_URL?>/snb_join.jpg" alt="">
회원가입
</a>
</li>
<li>
<a href="<?=G4_BBS_URL?>/login.php" id="snb_login">
<img src="<?=G4_IMG_URL?>/snb_login.jpg" alt="">
로그인
</a>
</li>
<? } ?>
</ul>
</div>
</header>
<hr>
<nav id="gnb">
<script>$('#gnb').addClass('gnb_js');</script>
<h2>홈페이지 메인메뉴</h2>
<ul>
<?
$sql = " select * from {$g4['group_table']} where gr_show_menu order by gr_order ";
$result = sql_query($sql);
for ($gi=0; $row=sql_fetch_array($result); $gi++) { // gi 는 group index
?>
<li class="gnb_1depth">
<a href="<?=G4_BBS_URL?>/group.php?gr_id=<?=$row['gr_id']?>"><?=$row['gr_subject']?></a>
<ul>
<?
$sql2 = " select * from {$g4['board_table']} where gr_id = '{$row['gr_id']}' order by bo_order ";
$result2 = sql_query($sql2);
for ($bi=0; $row2=sql_fetch_array($result2); $bi++) { // bi 는 board index
?>
<li class="gnb_2depth"><a href="<?=G4_BBS_URL?>/board.php?bo_table=<?=$row2['bo_table']?>"><?=$row2['bo_subject']?></a></li>
<?}?>
</ul>
</li>
<?}?>
</ul>
</nav>
<hr>
<div id="wrapper">
<div id="lnb">
<?=outlogin('basic'); // 외부 로그인 ?>
<?=poll('basic'); // 설문조사 ?>
</div>
<div id="container">
<? if ((!$bo_table || $w == 's' ) && !defined("_INDEX_")) {?><h1 id="wrapper_title"><?=$g4['title']?></h1><?}?>

9
mobile/index.php Normal file
View File

@ -0,0 +1,9 @@
<?php
include_once(G4_MOBILE_PATH.'/_head.php');
?>
모바일 메인
<?
include_once(G4_MOBILE_PATH.'/_tail.php');
?>

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 B

View File

@ -0,0 +1,227 @@
<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
// 선택옵션으로 인해 셀합치기가 가변적으로 변함
$colspan = 5;
if ($is_checkbox) $colspan++;
if ($is_good) $colspan++;
if ($is_nogood) $colspan++;
?>
<? if (!$wr_id) {?><h1 id="bo_list_title"><?=$g4['title']?></h1><?}?>
<!-- 게시판 목록 시작 -->
<div id="bo_list" style="width:<?=$width;?>">
<? if ($is_category) { ?>
<form id="fcategory" name="fcategory" method="get">
<nav id="bo_cate">
<h2><?=$board['bo_subject']?> 카테고리</h2>
<ul id="bo_cate_ul">
<?=$category_option?>
</ul>
</nav>
</form>
<? } ?>
<div class="bo_fx">
<div id="bo_list_total">
<span>Total <?=number_format($total_count)?>건</span>
<?=$page?> 페이지
</div>
<? if ($rss_href || $write_href) {?>
<ul class="btn_bo_user">
<? if ($rss_href) { ?><li><a href="<?=$rss_href?>" class="btn_b01">RSS</a></li><? } ?>
<? if ($admin_href) { ?><li><a href="<?=$admin_href?>" class="btn_admin">관리자</a></li><? } ?>
<? if ($write_href) { ?><li><a href="<?=$write_href?>" class="btn_b02">글쓰기</a></li><? } ?>
</ul>
<? } ?>
</div>
<form id="fboardlist" name="fboardlist" method="post" action="./board_list_update.php" onsubmit="return fboardlist_submit(this);">
<input type="hidden" name="bo_table" value="<?=$bo_table?>">
<input type="hidden" name="sfl" value="<?=$sfl?>">
<input type="hidden" name="stx" value="<?=$stx?>">
<input type="hidden" name="spt" value="<?=$spt?>">
<input type="hidden" name="page" value="<?=$page?>">
<input type="hidden" name="sw" value="">
<table class="basic_tbl">
<thead>
<tr>
<th scope="col">번호</th>
<? if ($is_checkbox) { ?><th scope="col"><input type="checkbox" onclick="if (this.checked) all_checked(true); else all_checked(false);" title="현재 페이지 게시물 전체선택"></th><?}?>
<th scope="col">제목</th>
<th scope="col">글쓴이</th>
<th scope="col"><?=subject_sort_link('wr_datetime', $qstr2, 1)?>날짜</a></th>
<th scope="col"><?=subject_sort_link('wr_hit', $qstr2, 1)?>조회</a></th>
<? if ($is_good) { ?><th scope="col"><?=subject_sort_link('wr_good', $qstr2, 1)?>추천</a></th><?}?>
<? if ($is_nogood) { ?><th scope="col"><?=subject_sort_link('wr_nogood', $qstr2, 1)?>비추천</a></th><?}?>
</tr>
</thead>
<tbody>
<?
for ($i=0; $i<count($list); $i++) {
?>
<tr class="<? if ($list[$i]['is_notice']) echo "bo_notice";?><? if ($board[1]) echo "bo_sideview";?>">
<td class="td_num">
<?
if ($list[$i]['is_notice']) // 공지사항
echo '<strong>공지</strong>';
else if ($wr_id == $list[$i]['wr_id'])
echo "<span class=\"bo_current\">열람중</span>";
else
echo $list[$i]['num'];
?>
</td>
<? if ($is_checkbox) { ?><td class="td_chk"><input type="checkbox" name="chk_wr_id[]" value="<?=$list[$i]['wr_id']?>" title="이 게시물 선택"></td><? } ?>
<td class="td_subject">
<?
echo $list[$i]['icon_reply'];
if ($is_category && $list[$i]['ca_name']) {
?>
<a href="<?=$list[$i]['ca_name_href']?>" class="bo_cate_link"><?=$list[$i]['ca_name']?></a>
<? } ?>
<a href="<?=$list[$i]['href']?>">
<?=$list[$i]['subject']?>
<? if ($list[$i]['comment_cnt']) { ?><span class="sound_only">댓글</span><?=$list[$i]['comment_cnt'];?><span class="sound_only">개</span><? } ?>
</a>
<?
// if ($list[$i]['link']['count']) { echo '['.$list[$i]['link']['count']}.']'; }
// if ($list[$i]['file']['count']) { echo '<'.$list[$i]['file']['count'].'>'; }
if (isset($list[$i]['icon_new'])) echo $list[$i]['icon_new'];
if (isset($list[$i]['icon_hot'])) echo $list[$i]['icon_hot'];
if (isset($list[$i]['icon_file'])) echo $list[$i]['icon_file'];
if (isset($list[$i]['icon_link'])) echo $list[$i]['icon_link'];
if (isset($list[$i]['icon_secret'])) echo $list[$i]['icon_secret'];
?>
</td>
<td class="td_name"><?=$list[$i]['name']?></td>
<td class="td_date"><?=$list[$i]['datetime2']?></td>
<td class="td_num"><?=$list[$i]['wr_hit']?></td>
<? if ($is_good) { ?><td class="td_num"><?=$list[$i]['wr_good']?></td><? } ?>
<? if ($is_nogood) { ?><td class="td_num"><?=$list[$i]['wr_nogood']?></td><? } ?>
</tr>
<?}?>
<? if (count($list) == 0) { echo '<tr><td colspan="'.$colspan.'" class="empty_table">게시물이 없습니다.</td></tr>'; } ?>
</tbody>
</table>
<? if ($list_href || $is_checkbox || $write_href) {?>
<div class="bo_fx">
<ul class="btn_bo_adm">
<? if ($list_href) { ?>
<li><a href="<?=$list_href?>" class="btn_b01"> 목록</a></li>
<? } ?>
<? if ($is_checkbox) { ?>
<li><input type="submit" name="btn_submit" onclick="document.pressed=this.value" value="선택삭제"></li>
<li><input type="submit" name="btn_submit" onclick="document.pressed=this.value" value="선택복사"></li>
<li><input type="submit" name="btn_submit" onclick="document.pressed=this.value" value="선택이동"></li>
<? } ?>
</ul>
<ul class="btn_bo_user">
<li><? if ($write_href) { ?><a href="<?=$write_href?>" class="btn_b02">글쓰기</a><? } ?></li>
</ul>
</div>
<? } ?>
</form>
</div>
<? if($is_checkbox) { ?>
<noscript>
<p>자바스크립트를 사용하지 않는 경우<br>별도의 확인 절차 없이 바로 선택삭제 처리하므로 주의하시기 바랍니다.</p>
</noscript>
<? } ?>
<!-- 페이지 -->
<? echo $write_pages; ?>
<fieldset id="bo_sch">
<legend>게시물 검색</legend>
<form name="fsearch" method="get">
<input type="hidden" name="bo_table" value="<?=$bo_table?>">
<input type="hidden" name="sca" value="<?=$sca?>">
<input type="hidden" name="sop" value="and">
<select name="sfl" title="검색대상">
<option value="wr_subject"<?=get_selected($sfl, 'wr_subject', true);?>>제목</option>
<option value="wr_content"<?=get_selected($sfl, 'wr_content');?>>내용</option>
<option value="wr_subject||wr_content"<?=get_selected($sfl, 'wr_subject||wr_content');?>>제목+내용</option>
<option value="mb_id,1"<?=get_selected($sfl, 'mb_id,1');?>>회원아이디</option>
<option value="mb_id,0"<?=get_selected($sfl, 'mb_id,0');?>>회원아이디(코)</option>
<option value="wr_name,1"<?=get_selected($sfl, 'wr_name,1');?>>글쓴이</option>
<option value="wr_name,0"<?=get_selected($sfl, 'wr_name,0');?>>글쓴이(코)</option>
</select>
<input name="stx" class="fs_input required" maxlength="15" size="15" required value="<?=stripslashes($stx)?>" title="검색어(필수)">
<input type="submit" class="fs_submit" value="검색">
</form>
</fieldset>
<? if ($is_checkbox) { ?>
<script>
function all_checked(sw) {
var f = document.fboardlist;
for (var i=0; i<f.length; i++) {
if (f.elements[i].name == "chk_wr_id[]")
f.elements[i].checked = sw;
}
}
function fboardlist_submit(f) {
var chk_count = 0;
for (var i=0; i<f.length; i++) {
if (f.elements[i].name == "chk_wr_id[]" && f.elements[i].checked)
chk_count++;
}
if (!chk_count) {
alert(document.pressed + "할 게시물을 하나 이상 선택하세요.");
return false;
}
if(document.pressed == "선택복사") {
select_copy("copy");
return;
}
if(document.pressed == "선택이동") {
select_copy("move");
return;
}
if(document.pressed == "선택삭제") {
if (!confirm("선택한 게시물을 정말 삭제하시겠습니까?\n\n한번 삭제한 자료는 복구할 수 없습니다"))
return false;
}
return true;
}
// 선택한 게시물 복사 및 이동
function select_copy(sw) {
var f = document.fboardlist;
if (sw == 'copy')
str = "복사";
else
str = "이동";
var sub_win = window.open("", "move", "left=50, top=50, width=500, height=550, scrollbars=1");
f.sw.value = sw;
f.target = "move";
f.action = "./move.php";
f.submit();
}
</script>
<? } ?>
<!-- 게시판 목록 끝 -->

View File

@ -0,0 +1,221 @@
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
include_once(G4_LIB_PATH.'/thumbnail.lib.php');
?>
<div id="bo_v" style="width:<?=$width;?>">
<p id="bo_v_cate">
<?=$board['bo_subject']?>
<? if ($category_name) { // 분류가 지정되었다면 ?><?=($category_name ? "{$view['ca_name']} " : "");?><? } // 분류 출력 끝 ?>
</p>
<h1 id="bo_v_h1"><?=cut_str(get_text($view['wr_subject']), 70) // 글제목 출력?></h1>
<section id="bo_v_info">
<h2>게시물 정보</h2>
작성자 <strong><?=$view['name']?><? if ($is_ip_view) { echo "&nbsp;($ip)"; } ?></strong>
<span class="sound_only">작성일</span><strong><?=date("y-m-d H:i", strtotime($view['wr_datetime']))?></strong>
조회<strong><?=number_format($view['wr_hit'])?>회</strong>
댓글<strong><?=number_format($view['wr_comment'])?>건</strong>
</section>
<?
if ($view['file']['count']) {
$cnt = 0;
for ($i=0; $i<count($view['file']); $i++) {
if (isset($view['file'][$i]['source']) && $view['file'][$i]['source'] && !$view['file'][$i]['view'])
$cnt++;
}
}
?>
<? if($cnt) { ?>
<section id="bo_v_file">
<h2>첨부파일</h2>
<ul>
<?
// 가변 파일
for ($i=0; $i<count($view['file']); $i++) {
if (isset($view['file'][$i]['source']) && $view['file'][$i]['source'] && !$view['file'][$i]['view']) {
?>
<li>
<a href="<? echo $view['file'][$i]['href']; ?>" onclick="javascript:file_download('<? echo $view['file'][$i]['href'].'&amp;confirm=yes'; ?>', '<?=$view['file'][$i]['source']?>'); return false;">
<img src="<?=$board_skin_url?>/img/icon_file.gif" alt="첨부파일">
<strong><?=$view['file'][$i]['source']?></strong>
<span> (<?=$view['file'][$i]['size']?>)</span>
</a>
<span class="bo_v_file_cnt"><?=$view['file'][$i]['download']?>회 다운로드</span>
<span>DATE : <?=$view['file'][$i]['datetime']?></span>
</li>
<?
}
}
?>
</ul>
</section>
<? } ?>
<?
if (implode('', $view['link'])) {
?>
<section id="bo_v_link">
<h2>관련링크</h2>
<ul>
<?
// 링크
$cnt = 0;
for ($i=1; $i<=count($view['link']); $i++) {
if ($view['link'][$i]) {
$cnt++;
$link = cut_str($view['link'][$i], 70);
?>
<li>
<a href="<?=$view['link_href'][$i]?>" target="_blank">
<img src="<?=$board_skin_url?>/img/icon_link.gif" alt="관련링크">
<strong><?=$link?></strong>
</a>
<span class="bo_v_link_cnt"><?=$view['link_hit'][$i]?>회 연결</span>
</li>
<?
}
}
?>
</ul>
</section>
<? } ?>
<nav id="bo_v_top">
<h2>게시물 상단 버튼</h2>
<?
ob_start();
?>
<? if ($prev_href || $next_href) { ?>
<ul class="bo_v_nb">
<? if ($prev_href) { ?><li><a href="<?=$prev_href?>" class="btn_b01">이전글</a></li><? } ?>
<? if ($next_href) { ?><li><a href="<?=$next_href?>" class="btn_b01">다음글</a></li><? } ?>
</ul>
<? } ?>
<ul class="bo_v_com">
<? if ($update_href) { ?><li><a href="<?=$update_href?>" class="btn_b01">수정</a></li><? } ?>
<? if ($delete_href) { ?><li><a href="<?=$delete_href?>" class="btn_b01" onclick="del(this.href); return false;">삭제</a></li><? } ?>
<? if ($copy_href) { ?><li><a href="<?=$copy_href?>" class="btn_admin" onclick="board_move(this.href); return false;">복사</a></li><? } ?>
<? if ($move_href) { ?><li><a href="<?=$move_href?>" class="btn_admin" onclick="board_move(this.href); return false;">이동</a></li><? } ?>
<? if ($search_href) { ?><li><a href="<?=$search_href?>" class="btn_b01">검색</a></li><? } ?>
<li><a href="<?=$list_href?>" class="btn_b01">목록</a></li>
<? if ($reply_href) { ?><li><a href="<?=$reply_href?>" class="btn_b01">답변</a></li><? } ?>
<? if ($write_href) { ?><li><a href="<?=$write_href?>" class="btn_b02">글쓰기</a></li><? } ?>
</ul>
<?
$link_buttons = ob_get_contents();
ob_end_flush();
?>
</nav>
<article id="bo_v_atc">
<header>
<h1>본문</h1>
</header>
<?
// 파일 출력
$v_img_count = count($view['file']);
if($v_img_count) {
echo "<div id=\"bo_v_img\">\n";
for ($i=0; $i<=count($view['file']); $i++) {
if ($view['file'][$i]['view']) {
//echo $view['file'][$i]['view'];
echo get_view_thumbnail($view['file'][$i]['view']);
}
}
echo "</div>\n";
}
?>
<div id="bo_v_con"><?=get_view_thumbnail($view['content']);?></div>
<?//echo $view[rich_content]; // {이미지:0} 과 같은 코드를 사용할 경우?>
<!-- 테러 태그 방지용 --></xml></xmp><a href=""></a><a href=''></a>
<? if ($is_signature) { ?><p><?=$signature?></p><? } ?>
<? if ($scrap_href || $good_href || $nogood_href) { ?>
<div id="bo_v_act">
<? if ($scrap_href) { ?><a href="<?=$scrap_href; ?>" target="_blank" onclick="win_scrap(this.href); return false;" class="btn_b01">스크랩</a><? } ?>
<? if ($good_href) {?><a href="<?=$good_href?>" class="btn_b01" target="hiddenframe">추천 <strong><?=number_format($view['wr_good'])?></strong></a><? } ?>
<? if ($nogood_href) {?><a href="<?=$nogood_href?>" class="btn_b01" target="hiddenframe">비추천 <strong><?=number_format($view['wr_nogood'])?></strong></a><? } ?>
</div>
<? } else {
if($board['bo_use_good'] || $board['bo_use_nogood']) {
?>
<div id="bo_v_act">
<? if($board['bo_use_good']) { ?><span>추천 <strong><?=number_format($view['wr_good'])?></strong></span><? } ?>
<? if($board['bo_use_nogood']) { ?><span>비추천 <strong><?=number_format($view['wr_nogood'])?></strong></span><? } ?>
</div>
<?
}
}
?>
</article>
<?
// 코멘트 입출력
include_once('./view_comment.php');
?>
<nav id="bo_v_bot">
<h2>게시물 하단 버튼</h2>
<!-- 링크 버튼 -->
<?=$link_buttons?>
</nav>
</div>
<script>
function file_download(link, file) {
<? if ($board['bo_download_point'] < 0) { ?>if (confirm("'"+file+"' 파일을 다운로드 하시면 포인트가 차감(<?=number_format($board['bo_download_point'])?>점)됩니다.\n\n포인트는 게시물당 한번만 차감되며 다음에 다시 다운로드 하셔도 중복하여 차감하지 않습니다.\n\n그래도 다운로드 하시겠습니까?"))<?}?>
document.location.href=link;
}
function board_move(href)
{
window.open(href, "boardmove", "left=50, top=50, width=500, height=550, scrollbars=1");
}
</script>
<!-- 게시글 보기 끝 -->
<script>
// 이미지 등비율 리사이징
$(window).load(function() {
view_image_resize();
});
$(function() {
$("a.view_image").click(function() {
window.open(this.href, "large_image", "top=10,left=10,width=10,height=10,resizable=yes,scrollbars=no,status=no");
return false;
});
});
function view_image_resize()
{
var $img = $("#bo_v_atc img");
var img_wrap = $("#bo_v_atc").width();
$img.each(function() {
var img_width = $(this).width();
$(this).data("width", img_width); // 원래 이미지 사이즈
if (img_width > img_wrap) {
$(this).addClass("img_fix");
} else if (img_width <= img_wrap && img_width >= $(this).data("width")) {
$(this).removeClass("img_fix");
}
});
}
</script>

View File

@ -0,0 +1,292 @@
<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>
<script>
// 글자수 제한
var char_min = parseInt(<?=$comment_min?>); // 최소
var char_max = parseInt(<?=$comment_max?>); // 최대
</script>
<!-- 댓글 리스트 -->
<section id="bo_vc">
<h2>댓글목록</h2>
<?
for ($i=0; $i<count($list); $i++) {
$comment_id = $list[$i]['wr_id'];
$cmt_depth = ""; // 댓글단계
$cmt_depth = strlen($list[$i]['wr_comment_reply']) * 20;
$str = $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);
// FLASH XSS 공격에 의해 주석 처리 - 110406
//$str = preg_replace("/\[\<a\s.*href\=\"(http|https|ftp)\:\/\/([^[:space:]]+)\.(swf)\".*\<\/a\>\]/i", "<script>doc_write(flash_movie('$1://$2.$3'));</script>", $str);
$str = preg_replace("/\[\<a\s*href\=\"(http|https|ftp)\:\/\/([^[:space:]]+)\.(gif|png|jpg|jpeg|bmp)\"\s*[^\>]*\>[^\s]*\<\/a\>\]/i", "<img src='$1://$2.$3' id='target_resize_image[]' onclick='image_window(this);'>", $str);
?>
<article id="c_<?=$comment_id?>" <?if ($cmt_depth) {?>style="margin-left:<?=$cmt_depth?>px;border-top-color:#e0e0e0"<?}?>>
<header>
<h1><?=$list[$i]['wr_name']?>님의 댓글</h1>
<?=$list[$i]['name']?>
<? if ($cmt_depth) {?><img src="<?=$board_skin_url?>/img/icon_reply.gif" class="icon_reply" alt="댓글의 댓글"><? } ?>
<? if ($is_ip_view) { ?>
아이피
<span class="bo_vc_hdinfo"><?=$list[$i]['ip'];?></span>
<? } ?>
작성일
<span class="bo_vc_hdinfo"><time datetime="<?=date('Y-m-d\TH:i:s+09:00', strtotime($list[$i]['datetime']))?>"><?=$list[$i]['datetime']?></time></span>
</header>
<!-- 댓글 출력 -->
<p>
<? if (strstr($list[$i]['wr_option'], "secret")) echo "<img src=\"".$board_skin_url."/img/icon_secret.gif\" alt=\"비밀글\">";?>
<?=$str?>
</p>
<span id="edit_<?=$comment_id?>"></span><!-- 수정 -->
<span id="reply_<?=$comment_id?>"></span><!-- 답변 -->
<input type="hidden" id="secret_comment_<?=$comment_id?>" value="<?=strstr($list[$i]['wr_option'],"secret")?>">
<textarea id="save_comment_<?=$comment_id?>" style="display:none"><?=get_text($list[$i]['content1'], 0)?></textarea>
<? if($list[$i]['is_reply'] || $list[$i]['is_edit'] || $list[$i]['is_del']) {
$query_string = str_replace("&", "&amp;", $_SERVER['QUERY_STRING']);
if($w == 'cu') {
$sql = " select wr_id, wr_content from $write_table where wr_id = '$c_id' and wr_is_comment = '1' ";
$cmt = sql_fetch($sql);
$c_wr_content = $cmt['wr_content'];
}
$c_reply_href = './board.php?'.$query_string.'&amp;c_id='.$comment_id.'&amp;w=c#bo_vc_w';
$c_edit_href = './board.php?'.$query_string.'&amp;c_id='.$comment_id.'&amp;w=cu#bo_vc_w';
?>
<footer>
<ul class="bo_vc_act">
<? if ($list[$i]['is_reply']) { ?><li><a href="<? echo $c_reply_href; ?>" onclick="comment_box('<?=$comment_id?>', 'c'); return false;">답변</a></li><? } ?>
<? if ($list[$i]['is_edit']) { ?><li><a href="<? echo $c_edit_href; ?>" onclick="comment_box('<?=$comment_id?>', 'cu'); return false;">수정</a></li><? } ?>
<? if ($list[$i]['is_del']) { ?><li><a href="<? echo $list[$i]['del_link']; ?>" onclick="comment_delete('<?=$list[$i]['del_link']?>'); return false;">삭제</a></li><? } ?>
</ul>
</footer>
<? } ?>
</article>
<?}?>
<? if ($i == 0) { //댓글이 없다면 ?><p id="bo_vc_empty">등록된 댓글이 없습니다.</p><? } ?>
</section>
<? if ($is_comment_write) {
if($w == '')
$w = 'c';
?>
<aside id="bo_vc_w">
<h2>댓글쓰기</h2>
<form name="fviewcomment" method="post" action="./write_comment_update.php" onsubmit="return fviewcomment_submit(this);" autocomplete="off">
<input type="hidden" id="w" name="w" value="<?=$w?>">
<input type="hidden" name="bo_table" value="<?=$bo_table?>">
<input type="hidden" name="wr_id" value="<?=$wr_id?>">
<input type="hidden" id="comment_id" name="comment_id" value="<?=$c_id?>">
<input type="hidden" name="sca" value="<?=$sca?>">
<input type="hidden" name="sfl" value="<?=$sfl?>">
<input type="hidden" name="stx" value="<?=$stx?>">
<input type="hidden" name="spt" value="<?=$spt?>">
<input type="hidden" name="page" value="<?=$page?>">
<input type="hidden" name="is_good" value="">
<table class="frm_tbl">
<tbody>
<? if ($is_guest) { ?>
<tr>
<th scope="row"><label for="wr_name">이름<strong class="sound_only">필수</strong></label></th>
<td><input type="text" id="wr_name" name="wr_name" class="frm_input required" maxLength="20" size="5" required></td>
</tr>
<tr>
<th scope="row"><label for="wr_password">패스워드<strong class="sound_only">필수</strong></label></th>
<td><input type="password" id="wr_password" name="wr_password" class="frm_input required" maxLength="20" size="10" required></td>
</tr>
<? } ?>
<tr>
<th scope="row"><label for="wr_secret">비밀글사용</label></th>
<td><input type="checkbox" id="wr_secret" name="wr_secret" value="secret"></td>
</tr>
<? if ($is_guest) { ?>
<tr>
<th scope="row">자동등록방지</th>
<td><?=$captcha_html;?></td>
</tr>
<? } ?>
<tr>
<th scope="row">내용</th>
<td>
<? if ($comment_min || $comment_max) { ?><strong id="char_cnt"><span id="char_count"></span>글자</strong><?}?>
<textarea id="wr_content" name="wr_content" required
<? if ($comment_min || $comment_max) { ?>onkeyup="check_byte('wr_content', 'char_count');"<?}?> title="댓글내용입력(필수)"><? echo $c_wr_content; ?></textarea>
<? if ($comment_min || $comment_max) { ?><script> check_byte('wr_content', 'char_count'); </script><?}?>
</td>
</tr>
</tbody>
</table>
<div class="btn_confirm">
<input type="submit" class="btn_submit" value="댓글입력">
</div>
</form>
</aside>
<script>
var save_before = '';
var save_html = document.getElementById('bo_vc_w').innerHTML;
function good_and_write()
{
var f = document.fviewcomment;
if (fviewcomment_submit(f)) {
f.is_good.value = 1;
f.submit();
} else {
f.is_good.value = 0;
}
}
function fviewcomment_submit(f)
{
var pattern = /(^\s*)|(\s*$)/g; // \s 공백 문자
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({
url: g4_bbs_url+"/filter.ajax.php",
type: "POST",
data: {
"subject": "",
"content": f.wr_content.value
},
dataType: "json",
async: false,
cache: false,
success: function(data, textStatus) {
subject = data.subject;
content = data.content;
}
});
if (content) {
alert("내용에 금지단어('"+content+"')가 포함되어있습니다");
f.wr_content.focus();
return false;
}
// 양쪽 공백 없애기
var pattern = /(^\s*)|(\s*$)/g; // \s 공백 문자
document.getElementById('wr_content').value = document.getElementById('wr_content').value.replace(pattern, "");
if (char_min > 0 || char_max > 0)
{
check_byte('wr_content', 'char_count');
var cnt = parseInt(document.getElementById('char_count').innerHTML);
if (char_min > 0 && char_min > cnt)
{
alert("댓글는 "+char_min+"글자 이상 쓰셔야 합니다.");
return false;
} else if (char_max > 0 && char_max < cnt)
{
alert("댓글는 "+char_max+"글자 이하로 쓰셔야 합니다.");
return false;
}
}
else if (!document.getElementById('wr_content').value)
{
alert("댓글를 입력하여 주십시오.");
return false;
}
if (typeof(f.wr_name) != 'undefined')
{
f.wr_name.value = f.wr_name.value.replace(pattern, "");
if (f.wr_name.value == '')
{
alert('이름이 입력되지 않았습니다.');
f.wr_name.focus();
return false;
}
}
if (typeof(f.wr_password) != 'undefined')
{
f.wr_password.value = f.wr_password.value.replace(pattern, "");
if (f.wr_password.value == '')
{
alert('패스워드가 입력되지 않았습니다.');
f.wr_password.focus();
return false;
}
}
<? if($is_guest) echo chk_captcha_js(); ?>
return true;
}
function comment_box(comment_id, work)
{
var el_id;
// 댓글 아이디가 넘어오면 답변, 수정
if (comment_id)
{
if (work == 'c')
el_id = 'reply_' + comment_id;
else
el_id = 'edit_' + comment_id;
}
else
el_id = 'bo_vc_w';
if (save_before != el_id)
{
if (save_before)
{
document.getElementById(save_before).style.display = 'none';
document.getElementById(save_before).innerHTML = '';
}
document.getElementById(el_id).style.display = '';
document.getElementById(el_id).innerHTML = save_html;
// 댓글 수정
if (work == 'cu')
{
document.getElementById('wr_content').value = document.getElementById('save_comment_' + comment_id).value;
if (typeof char_count != 'undefined')
check_byte('wr_content', 'char_count');
if (document.getElementById('secret_comment_'+comment_id).value)
document.getElementById('wr_secret').checked = true;
else
document.getElementById('wr_secret').checked = false;
}
document.getElementById('comment_id').value = comment_id;
document.getElementById('w').value = work;
save_before = el_id;
}
}
function comment_delete(url)
{
if (confirm("이 댓글를 삭제하시겠습니까?")) location.href = url;
}
comment_box('', 'c'); // 댓글 입력폼이 보이도록 처리하기위해서 추가 (root님)
</script>
<? } ?>

View File

@ -0,0 +1,234 @@
<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>
<h1 id="wrapper_title"><?=$g4['title']?></h1>
<form id="fwrite" name="fwrite" method="post" action="<?=$action_url?>" onsubmit="return fwrite_submit(this);" enctype="multipart/form-data" autocomplete="off" style="width:<?=$width;?>">
<input type="hidden" name="w" value="<?=$w?>">
<input type="hidden" name="bo_table" value="<?=$bo_table?>">
<input type="hidden" name="wr_id" value="<?=$wr_id?>">
<input type="hidden" name="sca" value="<?=$sca?>">
<input type="hidden" name="sfl" value="<?=$sfl?>">
<input type="hidden" name="stx" value="<?=$stx?>">
<input type="hidden" name="spt" value="<?=$spt?>">
<input type="hidden" name="sst" value="<?=$sst?>">
<input type="hidden" name="sod" value="<?=$sod?>">
<input type="hidden" name="page" value="<?=$page?>">
<?
$option = '';
$option_hidden = '';
if ($is_notice || $is_html || $is_secret || $is_mail) {
$option = '';
if ($is_notice) {
$option .= PHP_EOL.'<input type="checkbox" id="notice" name="notice" value="1" '.$notice_checked.'>'.PHP_EOL.'<label for="notice">공지</label>';
}
if ($is_html) {
if ($is_dhtml_editor) {
$option_hidden .= '<input type="hidden" value="html1" name="html">';
} else {
$option .= PHP_EOL.'<input type="checkbox" id="html" name="html" onclick="html_auto_br(this);" value="'.$html_value.'" '.$html_checked.'>'.PHP_EOL.'<label for="html">html</label>';
}
}
if ($is_secret) {
if ($is_admin || $is_secret==1) {
$option .= PHP_EOL.'<input type="checkbox" id="secret" name="secret" value="secret" '.$secret_checked.'>'.PHP_EOL.'<label for="secret">비밀글</label>';
} else {
$option_hidden .= '<input type="hidden" name="secret" value="secret">';
}
}
if ($is_mail) {
$option .= PHP_EOL.'<input type="checkbox" id="mail" name="mail" value="mail" '.$recv_email_checked.'>'.PHP_EOL.'<label for="mail">답변메일받기</label>';
}
}
echo $option_hidden;
?>
<table id="bo_w" class="frm_tbl">
<tbody>
<? if ($is_name) { ?>
<tr>
<th scope="row"><label for="wr_name">이름<strong class="sound_only">필수</strong></label></th>
<td><input type="text" id="wr_name" name="wr_name" class="frm_input required" size="10" maxlength="20" required value="<?=$name?>"></td>
</tr>
<? } ?>
<? if ($is_password) { ?>
<tr>
<th scope="row"><label for="wr_password">패스워드<strong class="sound_only">필수</strong></label></th>
<td><input type="password" id="wr_password" name="wr_password" class="frm_input" maxlength="20" <?=$password_required?>></td>
</tr>
<? } ?>
<? if ($is_email) { ?>
<tr>
<th scope="row"><label for="wr_email">이메일</label></th>
<td><input type="text" id="wr_email" name="wr_email" class="frm_input email" size="50" value="<?=$email?>" maxlength="100"></td>
</tr>
<? } ?>
<? if ($is_homepage) { ?>
<tr>
<th scope="row"><label for="wr_homepage">홈페이지</label></th>
<td><input type="text" id="wr_homepage" name="wr_homepage" class="frm_input" size="50" value="<?=$homepage?>"></td>
</tr>
<? } ?>
<? if ($option) { ?>
<tr>
<th scope="row">옵션</th>
<td><?=$option?></td>
</tr>
<? } ?>
<? if ($is_category) { ?>
<tr>
<th scope="row"><label for="ca_name">분류<strong class="sound_only">필수</strong></label></th>
<td>
<select id="ca_name" name="ca_name" class="required" required>
<option value="">선택하세요</option>
<?=$category_option?>
</select>
</td>
</tr>
<? } ?>
<tr>
<th scope="row"><label for="wr_subject">제목<strong class="sound_only">필수</strong></label></th>
<td><input type="text" id="wr_subject" name="wr_subject" class="frm_input required" size="50" required value="<?=$subject?>"></td>
</tr>
<tr>
<th scope="row"><label for="wr_content">내용<strong class="sound_only">필수</strong></label></th>
<td class="wr_content"><?=editor_html("wr_content", $content, $is_dhtml_editor);?></td>
</tr>
<? for ($i=1; $is_link && $i<=G4_LINK_COUNT; $i++) { ?>
<tr>
<th scope="row"><label for="wr_link<?=$i?>">링크 #<?=$i?></label></th>
<td><input type="text" id="wr_link<?=$i?>" name="wr_link<?=$i?>" class="frm_input" size="50" value="<?if($w=="u"){echo$write['wr_link'.$i];}?>"></td>
</tr>
<? } ?>
<? for ($i=0; $is_file && $i<$file_count; $i++) { ?>
<tr>
<th scope="row">파일 #<?=$i+1?></th>
<td>
<input type="file" name="bf_file[]" class="frm_file frm_input" title="파일첨부 <?=$i+1?> : 용량 <?=$upload_max_filesize?> 이하만 업로드 가능">
<? if ($is_file_content) { ?>
<input type="text" name="bf_content[]" class="frm_file frm_input" value="<? echo $file[$i]['bf_content']; ?>" size="50" title="파일 설명을 입력해주세요.">
<?}?>
<? if($w == 'u' && $file[$i]['file']) { ?>
<input type="checkbox" id="bf_file_del<?=$i?>" name="bf_file_del[<? echo $i; ?>]" value="1"> <label for="bf_file_del<?=$i?>"><? echo $file[$i]['source'].'('.$file[$i]['size'].')'; ?> 파일 삭제</label>
<? } ?>
</td>
</tr>
<?}?>
<? if ($is_guest) { //자동등록방지 ?>
<tr>
<th scope="row">자동등록방지</th>
<td>
<?=$captcha_html?>
</td>
</tr>
<? } ?>
</tbody>
</table>
<div class="btn_confirm">
<input type="submit" id="btn_submit" class="btn_submit" value="글쓰기" accesskey="s">
<a href="./board.php?bo_table=<?=$bo_table?>" class="btn_cancel">취소</a>
</div>
</form>
<script>
<?
// 관리자라면 분류 선택에 '공지' 옵션을 추가함
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 = "공지";
}';
}
?>
with (document.fwrite)
{
if (typeof(wr_name) != "undefined")
wr_name.focus();
else if (typeof(wr_subject) != "undefined")
wr_subject.focus();
else if (typeof(wr_content) != "undefined")
wr_content.focus();
if (typeof(ca_name) != "undefined")
if (w.value == "u") {
ca_name.value = "<?=isset($write['ca_name'])?$write['ca_name']:'';?>";
}
}
function html_auto_br(obj)
{
if (obj.checked) {
result = confirm("자동 줄바꿈을 하시겠습니까?\n\n자동 줄바꿈은 게시물 내용중 줄바뀐 곳을<br>태그로 변환하는 기능입니다.");
if (result)
obj.value = "html2";
else
obj.value = "html1";
}
else
obj.value = "";
}
function fwrite_submit(f)
{
<? echo get_editor_js('wr_content', $is_dhtml_editor); ?>
<? echo chk_editor_js('wr_content', $is_dhtml_editor); ?>
var subject = "";
var content = "";
$.ajax({
url: g4_bbs_url+"/filter.ajax.php",
type: "POST",
data: {
"subject": f.wr_subject.value,
"content": f.wr_content.value
},
dataType: "json",
async: false,
cache: false,
success: function(data, textStatus) {
subject = data.subject;
content = data.content;
}
});
if (subject) {
alert("제목에 금지단어('"+subject+"')가 포함되어있습니다");
f.wr_subject.focus();
return false;
}
if (content) {
alert("내용에 금지단어('"+content+"')가 포함되어있습니다");
if (typeof(ed_wr_content) != "undefined")
ed_wr_content.returnFalse();
else
f.wr_content.focus();
return false;
}
<? if ($is_guest) { echo chk_captcha_js(); } ?>
return true;
}
</script>

View File

@ -0,0 +1,6 @@
<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
// 회원수는 $row['mb_cnt'];
?>
<?=$row['total_cnt']?>

View File

@ -0,0 +1,41 @@
<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>
<h1>모바일 버전</h1>
<h1>모바일 버전</h1>
<h1>모바일 버전</h1>
<h1>모바일 버전</h1>
<h1>모바일 버전</h1>
<h1>모바일 버전</h1>
<table id="current_connect_tbl" class="basic_tbl">
<caption>현재접속자 목록</caption>
<thead>
<tr>
<th scope="col">번호</th>
<th scope="col">이름</th>
<th scope="col">위치</th>
</tr>
</thead>
<tbody>
<?
for ($i=0; $i<count($list); $i++) {
$location = conv_content($list[$i]['lo_location'], 0);
// 최고관리자에게만 허용
// 이 조건문은 가능한 변경하지 마십시오.
if ($list[$i]['lo_url'] && $is_admin == 'super') $display_location = "<a href=\"".$list[$i]['lo_url']."\">".$location."</a>";
else $display_location = $location;
?>
<tr>
<td class="td_num"><?=$list[$i]['num']?></td>
<td class="td_name"><?=$list[$i]['name']?></td>
<td><?=$display_location?></td>
</tr>
<?
}
if ($i == 0)
echo "<tr><td colspan=\"3\" class=\"empty_table\">현재 접속자가 없습니다.</td></tr>";
?>
</tbody>
</table>

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 853 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 890 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 B

View File

@ -0,0 +1,39 @@
<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>
<div class="lt">
<a href="<?=G4_BBS_URL?>/board.php?bo_table=<?=$bo_table?>" onclick="return false" class="lt_title"><strong><?=$bo_subject?></strong></a>
<ul>
<? for ($i=0; $i<count($list); $i++) { ?>
<li>
<?
//echo $list[$i]['icon_reply']." ";
echo "<a href=\"".$list[$i]['href']."\" title=\"".$list[$i]['wr_subject']."\">";
if ($list[$i]['is_notice'])
echo "<strong>".$list[$i]['subject']."</strong>";
else
echo $list[$i]['subject'];
if ($list[$i]['comment_cnt'])
echo " <span class=\"cnt_cmt\">".$list[$i]['comment_cnt']."</span>";
echo "</a>";
// if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
// if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }
if (isset($list[$i]['icon_new'])) echo " " . $list[$i]['icon_new'];
if (isset($list[$i]['icon_hot'])) echo " " . $list[$i]['icon_hot'];
if (isset($list[$i]['icon_file'])) echo " " . $list[$i]['icon_file'];
if (isset($list[$i]['icon_link'])) echo " " . $list[$i]['icon_link'];
if (isset($list[$i]['icon_secret'])) echo " " . $list[$i]['icon_secret'];
?>
</li>
<? } ?>
<? if (count($list) == 0) { //게시물이 없을 때 ?>
<li>게시물이 없습니다.</li>
<? } ?>
</ul>
<div class="lt_more"><a href="<?=G4_BBS_URL?>/board.php?bo_table=<?=$bo_table?>">더보기</a></div>
</div>

View File

@ -0,0 +1,90 @@
<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>
<div id="formmail" class="new_win">
<h1><?=$name?>님께 메일보내기</h1>
<form name="fformmail" method="post" action="./formmail_send.php" onsubmit="return fformmail_submit(this);" enctype="multipart/form-data" style="margin:0px;">
<input type="hidden" name="to" value="<?=$email?>">
<input type="hidden" name="attach" value="2">
<input type="hidden" name="token" value="<?=$token?>">
<? if ($is_member) { // 회원이면 ?>
<input type="hidden" name="fnick" value="<?=$member['mb_nick']?>">
<input type="hidden" name="fmail" value="<?=$member['mb_email']?>">
<? } ?>
<table class="frm_tbl">
<caption>메일쓰기</caption>
<tbody>
<? if (!$is_member) { ?>
<tr>
<th scope="row"><label for="fnick">이름<strong class="sound_only">필수</strong></label></th>
<td><input type="text" id="fnick" name="fnick" class="frm_input required" required></td>
</tr>
<tr>
<th scope="row"><label for="fmail">E-mail<strong class="sound_only">필수</strong></label></th>
<td><input type="text" id="fmail" name="fmail" class="frm_input required" required></td>
</tr>
<? } ?>
<tr>
<th scope="row"><label for="subject">제목<strong class="sound_only">필수</strong></label></th>
<td><input type=text id="subject" name="subject" class="frm_input required" required></td>
</tr>
<tr>
<th scope="row">형식</th>
<td>
<input type="radio" id="type_text" name="type" value="0" checked> <label for="type_text">TEXT</label>
<input type="radio" id="type_html" name="type" value="1" > <label for="type_html">HTML</label>
<input type="radio" id="type_both" name="type" value="2" > <label for="type_both">TEXT+HTML</label>
</td>
</tr>
<tr>
<th scope="row"><label for="content">내용<strong class="sound_only">필수</strong></label></th>
<td><textarea id="content" name="content" class="required" required></textarea></td>
</tr>
<tr>
<th scope="row"><label for="file1">첨부 1</label></th>
<td><input type="file" id="file1" name="file1" class="frm_input"></td>
</tr>
<tr>
<th scope="row"><label for="file2">첨부 2</label></th>
<td><input type="file" id="file2" name="file2" class="frm_input"></td>
</tr>
<tr>
<th scope="row">자동등록방지</th>
<td><?=captcha_html();?></td>
</tr>
</tbody>
</table>
<div class="btn_win">
<input type="submit" id="btn_submit" class="btn_submit" value="메일발송">
<a href="javascript:window.close();">창닫기</a>
</div>
</form>
</div>
<script>
with (document.fformmail) {
if (typeof fname != "undefined")
fname.focus();
else if (typeof subject != "undefined")
subject.focus();
}
function fformmail_submit(f)
{
<? echo chk_captcha_js(); ?>
if (f.file1.value || f.file2.value) {
// 4.00.11
if (!confirm("첨부파일의 용량이 큰경우 전송시간이 오래 걸립니다.\n\n메일보내기가 완료되기 전에 창을 닫거나 새로고침 하지 마십시오."))
return false;
}
document.getElementById('btn_submit').disabled = true;
return true;
}
</script>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -0,0 +1,54 @@
<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>
<div id="mb_login">
<h1><?=$g4['title']?></h1>
<form name="flogin" method="post" action="<?=$login_action_url?>" onsubmit="return flogin_submit(this);">
<input type="hidden" name="url" value='<?=$login_url?>'>
<fieldset class="cbg">
<label for="login_id" class="login_id">회원아이디<strong class="sound_only">필수</strong></label>
<input type="text" id="login_id" name="mb_id" class="fs_input" maxLength="20" size="20" required>
<label for="login_pw" class="login_pw">패스워드<strong class="sound_only">필수</strong></label>
<input type="password" id="login_pw" class="fs_input" name="mb_password" maxLength="20" size="20" required>
<input type="submit" class="btn_submit" value="로그인">
<input type="checkbox" id="login_auto_login" name="auto_login">
<label for="login_auto_login">자동로그인</label>
</fieldset>
<section>
<h2>회원로그인 안내</h2>
<p>
회원아이디 및 패스워드가 기억 안나실 때는 아이디/패스워드 찾기를 이용하십시오.<br>
아직 회원이 아니시라면 회원으로 가입 후 이용해 주십시오.
</p>
<div>
<a href="<?=$g4['bbs_url']?>/password_lost.php" id="login_password_lost" class="btn02" target="win_password_lost">아이디 패스워드 찾기</a>
<a href="./register.php" class="btn01">회원 가입</a>
</div>
</section>
<div class="btn_confirm">
<a href="<?=G4_URL?>/">메인으로 돌아가기</a>
</div>
</form>
</div>
<script>
$(function(){
$("#login_auto_login").click(function(){
if (this.checked) {
this.checked = confirm("자동로그인을 사용하시면 다음부터 회원아이디와 패스워드를 입력하실 필요가 없습니다.\n\n공공장소에서는 개인정보가 유출될 수 있으니 사용을 자제하여 주십시오.\n\n자동로그인을 사용하시겠습니까?");
}
});
});
function flogin_submit(f)
{
return true;
}
</script>

View File

@ -0,0 +1,5 @@
<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
// 자신만의 코드를 넣어주세요.
?>

View File

@ -0,0 +1,44 @@
<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>
<div id="mb_confirm">
<h1><?=$g4['title']?></h1>
<p>
<strong>패스워드를 한번 더 입력해주세요.</strong>
회원님의 정보를 안전하게 보호하기 위해 패스워드를 한번 더 확인합니다.
</p>
<form name="fmemberconfirm" method="post" onsubmit="return fmemberconfirm_submit(this);">
<input type=hidden name="mb_id" value="<?=$member[mb_id]?>">
<input type=hidden name="w" value="u">
<fieldset>
회원아이디
<span id="mb_confirm_id"><?=$member[mb_id]?></span>
<label for="confirm_mb_password">패스워드<strong class="sound_only">필수</strong></label>
<input type="password" id="confirm_mb_password" name="mb_password" class="fs_input" maxLength="20" size="15" required>
<input type="submit" id="btn_submit" class="fs_submit" value="확인">
</fieldset>
</form>
<div class="btn_confirm">
<a href="<?=G4_URL?>">메인으로 돌아가기</a>
</div>
</div>
<script>
document.onload = document.fmemberconfirm.mb_password.focus();
function fmemberconfirm_submit(f)
{
document.getElementById("btn_submit").disabled = true;
f.action = "<?=$url?>";
return true;
}
</script>

View File

@ -0,0 +1,44 @@
<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>
<div id="memo_list" class="new_win">
<h1><?=$g4['title']?></h1>
<ul class="new_win_ul">
<li><a href="./memo.php?kind=recv">받은쪽지</a></li>
<li><a href="./memo.php?kind=send">보낸쪽지</a></li>
<li><a href="./memo_form.php">쪽지쓰기</a></li>
</ul>
<table class="basic_tbl">
<caption>
전체 <?=$kind_title?>쪽지 <?=$total_count?>통<br>
</caption>
<thead>
<tr>
<th scope="col"><?= ($kind == "recv") ? "보낸사람" : "받는사람"; ?></th>
<th scope="col">보낸시간</th>
<th scope="col">읽은시간</th>
<th scope="col">관리</th>
</tr>
</thead>
<tbody>
<? for ($i=0; $i<count($list); $i++) { ?>
<tr>
<td><div><?=$list[$i]['name']?></div></td>
<td class="td_datetime"><a href="<?=$list[$i]['view_href']?>"><?=$list[$i]['send_datetime']?></font></td>
<td class="td_datetime"><a href="<?=$list[$i]['view_href']?>"><?=$list[$i]['read_datetime']?></font></td>
<td class="td_mng"><a href="<?=$list[$i]['del_href']?>" onclick="del(this.href); return false;">삭제</a></td>
</tr>
<? } ?>
<? if ($i==0) { echo "<tr><td colspan=\"4\" class=\"empty_table\">자료가 없습니다.</td></tr>"; } ?>
</tbody>
</table>
<p class="new_win_desc">
쪽지 보관일수는 최장 <strong><?=$config['cf_memo_del']?></strong>일 입니다.
</p>
<div class="btn_win"><a href="javascript:;" onclick="window.close();">창닫기</a></div>
</div>

View File

@ -0,0 +1,54 @@
<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>
<div id="memo_write" class="new_win">
<h1>쪽지보내기</h1>
<ul class="new_win_ul">
<li><a href="./memo.php?kind=recv">받은쪽지</a></li>
<li><a href="./memo.php?kind=send">보낸쪽지</a></li>
<li><a href="./memo_form.php">쪽지쓰기</a></li>
</ul>
<div class="cbox">
<form name="fmemoform" method="post" action="./memo_form_update.php" onsubmit="return fmemoform_submit(this);" autocomplete="off">
<table class="frm_tbl">
<caption>쪽지쓰기</caption>
<tbody>
<tr>
<th scope="row"><label for="me_recv_mb_id">받는 회원아이디<strong class="sound_only">필수</strong></label></th>
<td>
<input type="text" id="me_recv_mb_id" name="me_recv_mb_id" class="frm_input required" size="47" required value="<?=$me_recv_mb_id?>">
<span class="frm_info">여러 회원에게 보낼때는 컴마(,)로 구분하세요.</span>
</td>
</tr>
<tr>
<th scope="row"><label for="me_memo">내용</label></th>
<td><textarea id="me_memo" name="me_memo" required><?=$content?></textarea></td>
</tr>
<tr>
<th scope="row">자동등록방지</th>
<td>
<?=captcha_html();?>
</td>
</tr>
</tbody>
</table>
</div>
<div class="btn_win">
<input type="submit" id="btn_submit" class="btn_submit" value="보내기">
<a href="javascript:;" onclick="window.close();">창닫기</a>
</div>
</form>
</div>
<script>
function fmemoform_submit(f)
{
<? echo chk_captcha_js(); ?>
return true;
}
</script>

View File

@ -0,0 +1,48 @@
<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
$nick = get_sideview($mb['mb_id'], $mb['mb_nick'], $mb['mb_email'], $mb['mb_homepage']);
if($kind == "recv") {
$kind_str = "보낸";
$kind_date = "받은";
}
else {
$kind_str = "받는";
$kind_date = "보낸";
}
?>
<div id="memo_view" class="new_win">
<h1><?=$g4['title']?></h1>
<ul class="new_win_ul">
<li><a href="./memo.php?kind=recv">받은쪽지</a></li>
<li><a href="./memo.php?kind=send">보낸쪽지</a></li>
<li><a href="./memo_form.php">쪽지쓰기</a></li>
</ul>
<section>
<h2>쪽지 내용</h2>
<ul id="memo_view_ul">
<li class="memo_view_li">
<span class="memo_view_subj"><?=$kind_str?>사람</span>
<strong><?=$nick?></strong>
</li>
<li class="memo_view_li">
<span class="memo_view_subj"><?=$kind_date?>시간</span>
<strong><?=$memo['me_send_datetime']?></strong>
</li>
</ul>
<p>
<?=conv_content($memo['me_memo'], 0)?>
</p>
</section>
<div class="btn_win">
<? if($prev_link) { ?>
<a href="<?=$prev_link?>">이전쪽지</a>
<? } ?>
<? if($next_link) { ?>
<a href="<?=$next_link?>">다음쪽지</a>
<? } ?>
<? if ($kind == 'recv') { ?><a href="./memo_form.php?me_recv_mb_id=<?=$mb['mb_id']?>&amp;me_id=<?=$memo['me_id']?>" class="btn01">답장</a><? } ?>
<a href="./memo.php?kind=<?=$kind?>">목록보기</a>
<a href="javascript:;" onclick="window.close();">창닫기</a>
</div>
</div>

View File

@ -0,0 +1,49 @@
<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
$delete_str = "";
if ($w == 'x') $delete_str = "";
if ($w == 'u') $g4['title'] = $delete_str."글 수정";
else if ($w == 'd' || $w == 'x') $g4['title'] = $delete_str."글 삭제";
else $g4['title'] = $g4['title'];
?>
<div id="pw_confirm">
<h1><?=$g4['title']?></h1>
<p>
<? if ($w == 'u') {?>
<strong>작성자만 글을 수정할 수 있습니다.</strong>
작성자 본인이라면, 글 작성시 입력한 패스워드를 입력하여 글을 수정할 수 있습니다.
<? } else if ($w == 'd' || $w == 'x') { ?>
<strong>작성자만 글을 삭제할 수 있습니다.</strong>
작성자 본인이라면, 글 작성시 입력한 패스워드를 입력하여 글을 삭제할 수 있습니다.
<? } else { ?>
<strong>비밀글 기능으로 보호된 글입니다.</strong>
작성자와 관리자만 열람하실 수 있습니다. 본인이라면 패스워드를 입력하세요.
<? } ?>
</p>
<form name="fboardpassword" method="post" action="<? echo $action; ?>">
<input type="hidden" name="w" value="<?=$w?>">
<input type="hidden" name="bo_table" value="<?=$bo_table?>">
<input type="hidden" name="wr_id" value="<?=$wr_id?>">
<input type="hidden" name="comment_id" value="<?=$comment_id?>">
<input type="hidden" name="sfl" value="<?=$sfl?>">
<input type="hidden" name="stx" value="<?=$stx?>">
<input type="hidden" name="page" value="<?=$page?>">
<fieldset>
<label for="password_wr_password">패스워드<strong class="sound_only">필수</strong></label>
<input type="password" id="password_wr_password" name="wr_password" class="fs_input required" maxLength="20" size="15" required>
<input type="submit" class="fs_submit" value="확인">
</fieldset>
</form>
<div class="btn_confirm">
<a href="<?=$_SERVER['HTTP_REFERER']?>">돌아가기</a>
</div>
</div>
<script>
document.fboardpassword.wr_password.focus();
</script>

View File

@ -0,0 +1,45 @@
<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>
<div id="find_info" class="new_win">
<h1>아이디/패스워드 찾기</h1>
<form name="fpasswordlost" method="post" action="<?=$action_url?>" onsubmit="return fpasswordlost_submit(this);" autocomplete="off">
<fieldset id="find_info_fs">
<p>
회원가입 시 등록하신 이메일 주소를 입력해 주세요.<br>
해당 이메일로 아이디와 패스워드 정보를 보내드립니다.
</p>
<label for="mb_email">E-mail 주소<strong class="sound_only">필수</strong></label>
<input type="text" id="mb_email" name="mb_email" class="fs_input email" required size="30">
</fieldset>
<?=captcha_html(); ?>
<div class="btn_win">
<input type="submit" class="btn_submit" value="확인">
<a href="javascript:window.close();" class="btn_cancel">창닫기</a>
</div>
</form>
</div>
<script>
function fpasswordlost_submit(f)
{
<? echo chk_captcha_js(); ?>
return true;
}
self.focus();
document.fpasswordlost.mb_email.focus();
$(function() {
var sw = screen.width;
var sh = screen.height;
var cw = document.body.clientWidth;
var ch = document.body.clientHeight;
var top = sh / 2 - ch / 2 - 100;
var left = sw / 2 - cw / 2;
moveTo(left, top);
});
</script>

View File

@ -0,0 +1,43 @@
<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>
<div id="profile" class="new_win">
<h1><?=$mb_nick?>님의 프로필</h1>
<table class="frm_tbl">
<tbody>
<tr>
<th scope="row">회원권한</th>
<td><?=$mb['mb_level']?></td>
</tr>
<tr>
<th scope="row">포인트</th>
<td><?=number_format($mb['mb_point'])?></td>
</tr>
<? if ($mb_homepage) { ?>
<tr>
<th scope="row">홈페이지</th>
<td><a href="<?=$mb_homepage?>" target="_blank"><?=$mb_homepage?></a></td>
</tr>
<? } ?>
<tr>
<th scope="row">회원가입일</th>
<td><?=($member['mb_level'] >= $mb['mb_level']) ? substr($mb['mb_datetime'],0,10) ." (".number_format($mb_reg_after)." 일)" : "알 수 없음"; ?></td>
</tr>
<tr>
<th scope="row">최종접속일</th>
<td><?=($member['mb_level'] >= $mb['mb_level']) ? $mb['mb_today_login'] : "알 수 없음";?></td>
</tr>
</tbody>
</table>
<section>
<h2>인사말</h2>
<p><?=$mb_profile?></p>
</section>
<div class="btn_win">
<a href="javascript:window.close();">창닫기</a>
</div>
</div>

View File

@ -0,0 +1,50 @@
<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>
<form id="fregister" name="fregister" method="POST" action="<?=$register_action_url?>" onsubmit="return fregister_submit(this);" autocomplete="off">
<p>회원가입약관 및 개인정보수집이용안내의 내용에 동의하셔야 회원가입 하실 수 있습니다.</p>
<section id="fregister_term">
<h2>회원가입약관</h2>
<textarea readonly><?=get_text($config['cf_stipulation'])?></textarea>
<fieldset class="fregister_agree">
<label for="agree11">회원가입약관의 내용에 동의합니다.</label>
<input type="checkbox" id="agree11" name="agree" value="1">
</fieldset>
</section>
<section id="fregister_private">
<h2>개인정보수집이용안내</h2>
<textarea readonly><?=get_text($config['cf_privacy'])?></textarea>
<fieldset class="fregister_agree">
<label for="agree21">개인정보수집이용안내의 내용에 동의합니다.</label>
<input type="checkbox" id="agree21" name="agree2" value="1">
</fieldset>
</section>
<div class="btn_confirm">
<input type="submit" class="btn_submit" value="회원가입">
</div>
</form>
<script>
function fregister_submit(f)
{
if (!f.agree.checked) {
alert("회원가입약관의 내용에 동의하셔야 회원가입 하실 수 있습니다.");
f.agree.focus();
return false;
}
if (!f.agree2.checked) {
alert("개인정보수집이용안내의 내용에 동의하셔야 회원가입 하실 수 있습니다.");
f.agree2.focus();
return false;
}
return true;
}
</script>

View File

@ -0,0 +1,311 @@
<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>
<script src="<?=G4_JS_URL?>/jquery.register_form.js"></script>
<form id="fregisterform" name="fregisterform" method="post" action="<?=$register_action_url?>" onsubmit="return fregisterform_submit(this);" enctype="multipart/form-data" autocomplete="off">
<input type="hidden" name="w" value="<?=$w?>">
<input type="hidden" name="url" value="<?=$urlencode?>">
<input type="hidden" name="agree" value="<?=$agree?>">
<input type="hidden" name="agree2" value="<?=$agree2?>">
<? if (isset($member['mb_sex'])) { ?><input type="hidden" name="mb_sex" value="<?=$member['mb_sex']?>"><? } ?>
<? if (isset($member['mb_nick_date']) && $member['mb_nick_date'] > date("Y-m-d", G4_SERVER_TIME - ($config['cf_nick_modify'] * 86400))) { // 별명수정일이 지나지 않았다면 ?>
<input type="hidden" name="mb_nick_default" value="<?=$member['mb_nick']?>">
<input type="hidden" name="mb_nick" value="<?=$member['mb_nick']?>">
<? } ?>
<table class="frm_tbl">
<caption>사이트 이용정보 입력</caption>
<tr>
<th scope="row"><label for="reg_mb_id">아이디<strong class="sound_only">필수</strong></label></th>
<td>
<input type="text" id="reg_mb_id" name="mb_id" class="frm_input minlength_3 <?=$required?> <?=$readonly?>" value="<?=$member['mb_id']?>" maxlength="20" <?=$required?> <?=$readonly?>>
<span id="msg_mb_id"></span>
<span class="frm_info">영문자, 숫자, _ 만 입력 가능. 최소 3자이상 입력하세요.</span>
</td>
</tr>
<tr>
<th scope="row"><label for="reg_mb_password">패스워드<strong class="sound_only">필수</strong></label></th>
<td><input type="password" id="reg_mb_password" name="mb_password" class="frm_input minlength_3 <?=$required?>" maxlength="20" <?=$required?>></td>
</tr>
<tr>
<th scope="row"><label for="reg_mb_password_re">패스워드 확인<strong class="sound_only">필수</strong></label></th>
<td><input type="password" id="reg_mb_password_re" name="mb_password_re" class="frm_input minlength_3 <?=$required?>" maxlength="20" <?=$required?>></td>
</tr>
</table>
<table class="frm_tbl">
<caption>개인정보 입력</caption>
<tr>
<th scope="row"><label for="reg_mb_name">이름<strong class="sound_only">필수</strong></label></th>
<td>
<input id="reg_mb_name" name="mb_name" class="frm_input hangul nospace <?=$required?> <?=$readonly?>" value="<?=$member['mb_name']?>" size="10" <?=$required?> <?=$readonly?>>
<? if ($w=='') { echo "<span class=\"frm_info\">공백없이 한글만 입력하세요.</span>"; } ?>
</td>
</tr>
<? if ($req_nick) { ?>
<tr>
<th scope="row"><label for="reg_mb_nick">별명<strong class="sound_only">필수</strong></label></th>
<td>
<input type="hidden" name="mb_nick_default" value="<?=isset($member['mb_nick'])?$member['mb_nick']:'';?>">
<input type="text" id="reg_mb_nick" name="mb_nick" class="frm_input required nospace" maxlength="20" size="10" value="<?=isset($member['mb_nick'])?$member['mb_nick']:'';?>" required>
<span id="msg_mb_nick"></span>
<span class="frm_info">
공백없이 한글,영문,숫자만 입력 가능 (한글2자, 영문4자 이상)<br>
별명을 바꾸시면 앞으로 <?=(int)$config['cf_nick_modify']?>일 이내에는 변경 할 수 없습니다.
</span>
</td>
</tr>
<? } ?>
<tr>
<th scope="row"><label for="reg_mb_email">E-mail<? if ($config['cf_use_email_certify']) {?><strong class="sound_only">필수</strong><?}?></label></th>
<td>
<input type="hidden" name="old_email" value="<?=$member['mb_email']?>">
<input type="text" id="reg_mb_email" name="mb_email" class="frm_input email <?=$config['cf_use_email_certify']?"required":"";?>" maxlength="100" size="50" value='<?=isset($member['mb_email'])?$member['mb_email']:'';?>' <?=$config['cf_use_email_certify']?"required":"";?>>
<? if ($config['cf_use_email_certify']) { ?>
<span class="frm_info">
<? if ($w=='') { echo "E-mail 로 발송된 내용을 확인한 후 인증하셔야 회원가입이 완료됩니다."; } ?>
<? if ($w=='u') { echo "E-mail 주소를 변경하시면 다시 인증하셔야 합니다."; } ?>
</span>
<? } ?>
</td>
</tr>
<? if ($config['cf_use_homepage']) { ?>
<tr>
<th scope="row"><label for="reg_mb_homepage">홈페이지<? if ($config['cf_req_homepage']){?><strong class="sound_only">필수</strong><?}?></label></th>
<td><input type="text" id="reg_mb_homepage" name="mb_homepage" class="frm_input <?=$config['cf_req_homepage']?"required":"";?>" maxlength="255" size="50" <?=$config['cf_req_homepage']?"required":"";?> value="<?=$member['mb_homepage']?>"></td>
</tr>
<? } ?>
<? if ($config['cf_use_tel']) { ?>
<tr>
<th scope="row"><label for="reg_mb_tel">전화번호<? if ($config['cf_req_tel']) {?><strong class="sound_only">필수</strong><?}?></label></th>
<td><input type="text" id="reg_mb_tel" name="mb_tel" class="frm_input <?=$config['cf_req_tel']?"required":"";?>" maxlength="20" <?=$config['cf_req_tel']?"required":"";?> value="<?=$member['mb_tel']?>"></td>
</tr>
<? } ?>
<? if ($config['cf_use_hp']) { ?>
<tr>
<th scope="row"><label for="reg_mb_hp">핸드폰번호<? if ($config['cf_req_hp']) {?><strong class="sound_only">필수</strong><?}?></label></th>
<td><input type="text" id="reg_mb_hp" name="mb_hp" class="frm_input <?=$config['cf_req_hp']?"required":"";?>" maxlength="20" <?=$config['cf_req_hp']?"required":"";?> value="<?=$member[mb_hp]?>"></td>
</tr>
<? } ?>
<? if ($config['cf_use_addr']) {
$zip_href = G4_BBS_URL.'/zip.php?frm_name=fregisterform&amp;frm_zip1=mb_zip1&amp;frm_zip2=mb_zip2&amp;frm_addr1=mb_addr1&amp;frm_addr2=mb_addr2';
?>
<tr>
<th scope="row">
주소
<? if ($config['cf_req_addr']) {?><strong class="sound_only">필수</strong><? } ?>
</th>
<td>
<input type="text" id="reg_mb_zip1" name="mb_zip1" class="frm_input <?=$config['cf_req_addr']?"required":"";?>" size="2" maxlength="3" <?=$config['cf_req_addr']?"required":"";?> value="<?=$member['mb_zip1']?>" title="우편번호 앞자리">
-
<input type="text" id="reg_mb_zip2" name="mb_zip2" class="frm_input <?=$config['cf_req_addr']?"required":"";?>" size="2" maxlength="3" <?=$config['cf_req_addr']?"required":"";?> value="<?=$member['mb_zip2']?>" title="우편번호 뒷자리">
<a href="<? echo $zip_href; ?>" id="reg_zip_find" class="btn_frmline win_zip_find" target="_blank">주소찾기</a>
<input type="text" id="reg_mb_addr1" name="mb_addr1" class="frm_input frm_address <?=$config['cf_req_addr']?"required":"";?>" size="50" <?=$config['cf_req_addr']?"required":"";?> value="<?=$member['mb_addr1']?>" title="행정구역주소">
<input type="text" id="reg_mb_addr2" name="mb_addr2" class="frm_input frm_address <?=$config['cf_req_addr']?"required":"";?>" size="50" <?=$config['cf_req_addr']?"required":"";?> value="<?=$member['mb_addr2']?>" title="상세주소">
</td>
</tr>
<? } ?>
</table>
<table class="frm_tbl">
<caption>기타 개인설정</caption>
<? if ($config['cf_use_signature']) { ?>
<tr>
<th scope="row"><label for="reg_mb_signature">서명<? if ($config['cf_req_signature']){?><strong class="sound_only">필수</strong><?}?></label></th>
<td><textarea id="reg_mb_signature" name="mb_signature" class="<?=$config['cf_req_signature']?"required":"";?>" <?=$config['cf_req_signature']?"required":"";?>><?=$member['mb_signature']?></textarea></td>
</tr>
<? } ?>
<? if ($config['cf_use_profile']) { ?>
<tr>
<th scope="row"><label for="reg_mb_profile">자기소개</label></th>
<td><textarea id="reg_mb_profile" name="mb_profile" class="<?=$config['cf_req_profile']?"required":"";?>" <?=$config['cf_req_profile']?"required":"";?>><?=$member['mb_profile']?></textarea></td>
</tr>
<? } ?>
<? if ($member['mb_level'] >= $config['cf_icon_level']) { ?>
<tr>
<th scope="row"><label for="reg_mb_icon">회원아이콘</label></th>
<td>
<input type="file" id="reg_mb_icon" name="mb_icon" class="frm_input">
<? if ($w == 'u' && file_exists($mb_icon)) { ?>
<input type="checkbox" id="del_mb_icon" name="del_mb_icon" value="1">
<label for="del_mb_icon">삭제</label>
<? } ?>
<span class="frm_info">
이미지 크기는 가로 <?=$config['cf_member_icon_width']?>픽셀, 세로 <?=$config['cf_member_icon_height']?>픽셀 이하로 해주세요.<br>
gif만 가능하며 용량 <?=number_format($config['cf_member_icon_size'])?>바이트 이하만 등록됩니다.
</span>
</td>
</tr>
<? } ?>
<tr>
<th scope="row"><label for="reg_mb_mailling">메일링서비스</label></th>
<td>
<input type="checkbox" id="reg_mb_mailling" name="mb_mailling" value="1" <?=($w=='' || $member['mb_mailling'])?'checked':'';?>>
정보 메일을 받겠습니다.
</td>
</tr>
<? if ($config['cf_use_hp']) { ?>
<tr>
<th scope="row"><label for="reg_mb_sms">SMS 수신여부</label></th>
<td>
<input type="checkbox" id="reg_mb_sms" name="mb_sms" value="1" <?=($w=='' || $member['mb_sms'])?'checked':'';?>>
핸드폰 문자메세지를 받겠습니다.
</td>
</tr>
<? } ?>
<? if (isset($member['mb_open_date']) && $member['mb_open_date'] <= date("Y-m-d", G4_SERVER_TIME - ($config['cf_open_modify'] * 86400)) || empty($member['mb_open_date'])) { // 정보공개 수정일이 지났다면 수정가능 ?>
<tr>
<th scope="row"><label for="reg_mb_open">정보공개</label></th>
<td>
<input type="hidden" name="mb_open_default" value="<?=$member['mb_open']?>">
<input type="checkbox" id="reg_mb_open" name="mb_open" value="1" <?=($w=='' || $member['mb_open'])?'checked':'';?>>
다른분들이 나의 정보를 볼 수 있도록 합니다.
<span class="frm_info">
정보공개를 바꾸시면 앞으로 <?=(int)$config['cf_open_modify']?>일 이내에는 변경이 안됩니다.
</span>
</td>
</tr>
<? } else { ?>
<tr>
<th scope="row">정보공개</th>
<td>
<input type="hidden" name="mb_open" value="<?=$member['mb_open']?>">
<span class="frm_info">
정보공개는 수정후 <?=(int)$config['cf_open_modify']?>일 이내, <?=date("Y년 m월 j일", isset($member['mb_open_date']) ? strtotime("{$member['mb_open_date']} 00:00:00")+$config['cf_open_modify']*86400:G4_SERVER_TIME+$config['cf_open_modify']*86400);?> 까지는 변경이 안됩니다.<br>
이렇게 하는 이유는 잦은 정보공개 수정으로 인하여 쪽지를 보낸 후 받지 않는 경우를 막기 위해서 입니다.
</span>
</td>
</tr>
<? } ?>
<? if ($w == "" && $config['cf_use_recommend']) { ?>
<tr>
<th scope="row"><label for="reg_mb_recommend">추천인아이디</label></th>
<td><input type="text" id="reg_mb_recommend" name="mb_recommend" class="frm_input"></td>
</tr>
<? } ?>
<tr>
<th scope="row">자동등록방지</th>
<td><?=$captcha_html?></td>
</tr>
</table>
<div class="btn_confirm">
<input type="submit" class="btn_submit" value="<?=$w==''?'회원가입':'정보수정';?>" accesskey="s">
<a href="<?=$g4['path']?>/" class="btn_cancel">취소</a>
</div>
</form>
<script>
$(function() {
$("#reg_zip_find").css("display", "inline-block");
$("#reg_mb_zip1, #reg_mb_zip2, #reg_mb_addr1").attr("readonly", true);
});
// submit 최종 폼체크
function fregisterform_submit(f)
{
// 회원아이디 검사
if (f.w.value == "") {
var msg = reg_mb_id_check();
if (msg) {
alert(msg);
f.mb_id.select();
return false;
}
}
if (f.w.value == '') {
if (f.mb_password.value.length < 3) {
alert('패스워드를 3글자 이상 입력하십시오.');
f.mb_password.focus();
return false;
}
}
if (f.mb_password.value != f.mb_password_re.value) {
alert('패스워드가 같지 않습니다.');
f.mb_password_re.focus();
return false;
}
if (f.mb_password.value.length > 0) {
if (f.mb_password_re.value.length < 3) {
alert('패스워드를 3글자 이상 입력하십시오.');
f.mb_password_re.focus();
return false;
}
}
// 이름 검사
if (f.w.value=='') {
if (f.mb_name.value.length < 1) {
alert('이름을 입력하십시오.');
f.mb_name.focus();
return false;
}
var pattern = /([^가-힣\x20])/i;
if (pattern.test(f.mb_name.value)) {
alert('이름은 한글로 입력하십시오.');
f.mb_name.select();
return false;
}
}
// 별명 검사
if ((f.w.value == "") || (f.w.value == "u" && f.mb_nick.defaultValue != f.mb_nick.value)) {
var msg = reg_mb_nick_check();
if (msg) {
alert(msg);
f.reg_mb_nick.select();
return false;
}
}
// E-mail 검사
if ((f.w.value == "") || (f.w.value == "u" && f.mb_email.defaultValue != f.mb_email.value)) {
var msg = reg_mb_email_check();
if (msg) {
alert(msg);
f.reg_mb_email.select();
return false;
}
}
if (typeof f.mb_icon != 'undefined') {
if (f.mb_icon.value) {
if (!f.mb_icon.value.toLowerCase().match(/.(gif)$/i)) {
alert('회원아이콘이 gif 파일이 아닙니다.');
f.mb_icon.focus();
return false;
}
}
}
if (typeof(f.mb_recommend) != 'undefined') {
if (f.mb_id.value == f.mb_recommend.value) {
alert('본인을 추천할 수 없습니다.');
f.mb_recommend.focus();
return false;
}
}
<? echo chk_captcha_js(); ?>
return true;
}
</script>

View File

@ -0,0 +1,5 @@
<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
// 자신만의 코드를 넣어주세요.
?>

View File

@ -0,0 +1,43 @@
<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>
<div id="reg_result">
<div id="reg_result_logo"><img src="<?=$member_skin_url?>/img/reg_result_logo.jpg" alt=""></div>
<p>
<strong><?=$mb['mb_name']?></strong>님의 회원가입을 진심으로 축하합니다.<br>
</p>
<? if ($config['cf_use_email_certify']) { ?>
<p>
회원 가입 시 입력하신 이메일 주소로 인증메일이 발송되었습니다.<br>
발송된 인증메일을 확인하신 후 인증처리를 하시면 사이트를 원활하게 이용하실 수 있습니다.
</p>
<div id="reg_result_email">
<span>아이디</span>
<strong><?=$mb['mb_id']?></strong><br>
<span>이메일 주소</span>
<strong><?=$mb['mb_email']?></strong>
</div>
<p>
이메일 주소를 잘못 입력하셨다면, 사이트 관리자에게 문의해주시기 바랍니다.
</p>
<? } ?>
<p>
회원님의 패스워드는 아무도 알 수 없는 암호화 코드로 저장되므로 안심하셔도 좋습니다.<br>
아이디, 패스워드 분실시에는 회원가입시 입력하신 패스워드 분실시 질문, 답변을 이용하여 찾을 수 있습니다.
</p>
<p>
회원 탈퇴는 언제든지 가능하며 일정기간이 지난 후, 회원님의 정보는 삭제하고 있습니다.<br>
감사합니다.
</p>
<div class="btn_confirm">
<a href="<?=G4_URL?>/" class="btn02">메인으로</a>
</div>
</div>

View File

@ -0,0 +1,37 @@
<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>
<div id="scrap" class="new_win">
<h1><?=$g4['title']?></h1>
<table class="basic_tbl">
<caption>스크랩 목록</caption>
<thead>
<tr>
<th scope="col">번호</th>
<th scope="col">게시판</th>
<th scope="col">제목</th>
<th scope="col">보관일시</th>
<th scope="col">삭제</th>
</tr>
</thead>
<tbody>
<? for ($i=0; $i<count($list); $i++) { ?>
<tr>
<td class="td_num"><?=$list[$i]['num']?></td>
<td class="td_board"><a href="<?=$list[$i]['opener_href']?>" target="_blank" onclick="opener.document.location.href='<?=$list[$i]['opener_href']?>'; return false;"><?=$list[$i]['bo_subject']?></a></td>
<td><a href="<?=$list[$i]['opener_href_wr_id']?>" target="_blank" onclick="opener.document.location.href='<?=$list[$i]['opener_href_wr_id']?>'; return false;"><?=$list[$i]['subject']?></a></td>
<td class="td_datetime"><?=$list[$i]['ms_datetime']?></td>
<td class="td_mng"><a href="<? echo $list[$i]['del_href']; ?>" onclick="del(this.href); return false;">삭제</a></td>
</tr>
<? } ?>
<? if ($i == 0) echo "<tr><td colspan=\"5\" class=\"empty_table\">자료가 없습니다.</td></tr>"; ?>
</tbody>
</table>
<?=get_paging($config['cf_write_pages'], $page, $total_page, "?$qstr&amp;page=");?>
<div class="btn_win"><a href="javascript:;" onclick="window.close();">창닫기</a></div>
</div>

View File

@ -0,0 +1,34 @@
<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>
<div id="scrap_do" class="new_win">
<h1>스크랩하기</h1>
<form name="f_scrap_popin" method="post" action="./scrap_popin_update.php">
<input type="hidden" name="bo_table" value="<?=$bo_table?>">
<input type="hidden" name="wr_id" value="<?=$wr_id?>">
<table class="frm_tbl">
<caption>제목 확인 및 댓글 쓰기</caption>
<tbody>
<tr>
<th scope="row">제목</th>
<td><?=get_text(cut_str($write['wr_subject'], 255))?></td>
</tr>
<tr>
<th scope="row"><label for="wr_content">댓글</label></th>
<td><textarea id="wr_content" name="wr_content"></textarea></td>
</tr>
</tbody>
</table>
<p class="new_win_desc">
스크랩을 하시면서 감사 혹은 격려의 댓글을 남기실 수 있습니다.
</p>
<div class="btn_win">
<input type="submit" class="btn_submit" value="스크랩">
</div>
</form>
</div>

View File

@ -0,0 +1,62 @@
<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>
<div id="post_code" class="new_win">
<h1><?=$g4['title']?></h1>
<form name="fzip" method="get" autocomplete="off">
<input type="hidden" name="frm_name" value="<?=$frm_name?>">
<input type="hidden" name="frm_zip1" value="<?=$frm_zip1?>">
<input type="hidden" name="frm_zip2" value="<?=$frm_zip2?>">
<input type="hidden" name="frm_addr1" value="<?=$frm_addr1?>">
<input type="hidden" name="frm_addr2" value="<?=$frm_addr2?>">
<fieldset>
<label for="addr1">동/읍/면/리 검색</label>
<input type="text" id="addr1" name="addr1" class="fs_input" value="<?=$addr1?>" required minlength=2>
<input type="submit" class="fs_submit" value="검색">
</fieldset>
<!-- 검색결과 여기서부터 -->
<script>
document.fzip.addr1.focus();
</script>
<? if ($search_count > 0) { ?>
<dl>
<dt>총 <?=$search_count?>건 가나다순 정렬</dt>
<dd>
<ul>
<? for ($i=0; $i<count($list); $i++) { ?>
<li><a href='javascript:;' onclick="find_zip('<?=$list[$i][zip1]?>', '<?=$list[$i][zip2]?>', '<?=$list[$i][addr]?>');"><span class="post_code"><?=$list[$i][zip1]?>-<?=$list[$i][zip2]?></span> <?=$list[$i][addr]?> <?=$list[$i][bunji]?></a></li>
<? } ?>
</ul>
</dd>
</dl>
<p>검색결과가 끝났습니다.</p>
<div class="btn_win">
<a href="javascript:window.close();">창닫기</a>
</div>
<script>
function find_zip(zip1, zip2, addr1)
{
var of = opener.document.<?=$frm_name?>;
of.<?=$frm_zip1?>.value = zip1;
of.<?=$frm_zip2?>.value = zip2;
of.<?=$frm_addr1?>.value = addr1;
of.<?=$frm_addr2?>.focus();
window.close();
return false;
}
</script>
<? } ?>
</div>

View File

@ -0,0 +1,90 @@
<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>
<div id="formmail" class="new_win">
<h1><?=$name?>님께 메일보내기</h1>
<form name="fformmail" method="post" action="./formmail_send.php" onsubmit="return fformmail_submit(this);" enctype="multipart/form-data" style="margin:0px;">
<input type="hidden" name="to" value="<?=$email?>">
<input type="hidden" name="attach" value="2">
<input type="hidden" name="token" value="<?=$token?>">
<? if ($is_member) { // 회원이면 ?>
<input type="hidden" name="fnick" value="<?=$member['mb_nick']?>">
<input type="hidden" name="fmail" value="<?=$member['mb_email']?>">
<? } ?>
<table class="frm_tbl">
<caption>메일쓰기</caption>
<tbody>
<? if (!$is_member) { ?>
<tr>
<th scope="row"><label for="fnick">이름<strong class="sound_only">필수</strong></label></th>
<td><input type="text" id="fnick" name="fnick" class="frm_input required" required></td>
</tr>
<tr>
<th scope="row"><label for="fmail">E-mail<strong class="sound_only">필수</strong></label></th>
<td><input type="text" id="fmail" name="fmail" class="frm_input required" required></td>
</tr>
<? } ?>
<tr>
<th scope="row"><label for="subject">제목<strong class="sound_only">필수</strong></label></th>
<td><input type=text id="subject" name="subject" class="frm_input required" required></td>
</tr>
<tr>
<th scope="row">형식</th>
<td>
<input type="radio" id="type_text" name="type" value="0" checked> <label for="type_text">TEXT</label>
<input type="radio" id="type_html" name="type" value="1" > <label for="type_html">HTML</label>
<input type="radio" id="type_both" name="type" value="2" > <label for="type_both">TEXT+HTML</label>
</td>
</tr>
<tr>
<th scope="row"><label for="content">내용<strong class="sound_only">필수</strong></label></th>
<td><textarea id="content" name="content" class="required" required></textarea></td>
</tr>
<tr>
<th scope="row"><label for="file1">첨부 1</label></th>
<td><input type="file" id="file1" name="file1" class="frm_input"></td>
</tr>
<tr>
<th scope="row"><label for="file2">첨부 2</label></th>
<td><input type="file" id="file2" name="file2" class="frm_input"></td>
</tr>
<tr>
<th scope="row">자동등록방지</th>
<td><?=captcha_html();?></td>
</tr>
</tbody>
</table>
<div class="btn_win">
<input type="submit" id="btn_submit" class="btn_submit" value="메일발송">
<a href="javascript:window.close();">창닫기</a>
</div>
</form>
</div>
<script>
with (document.fformmail) {
if (typeof fname != "undefined")
fname.focus();
else if (typeof subject != "undefined")
subject.focus();
}
function fformmail_submit(f)
{
<? echo chk_captcha_js(); ?>
if (f.file1.value || f.file2.value) {
// 4.00.11
if (!confirm("첨부파일의 용량이 큰경우 전송시간이 오래 걸립니다.\n\n메일보내기가 완료되기 전에 창을 닫거나 새로고침 하지 마십시오."))
return false;
}
document.getElementById('btn_submit').disabled = true;
return true;
}
</script>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -0,0 +1,54 @@
<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>
<div id="mb_login">
<h1><?=$g4['title']?></h1>
<form name="flogin" method="post" action="<?=$login_action_url?>" onsubmit="return flogin_submit(this);">
<input type="hidden" name="url" value='<?=$login_url?>'>
<fieldset class="cbg">
<label for="login_id" class="login_id">회원아이디<strong class="sound_only">필수</strong></label>
<input type="text" id="login_id" name="mb_id" class="fs_input" maxLength="20" size="20" required>
<label for="login_pw" class="login_pw">패스워드<strong class="sound_only">필수</strong></label>
<input type="password" id="login_pw" class="fs_input" name="mb_password" maxLength="20" size="20" required>
<input type="submit" class="btn_submit" value="로그인">
<input type="checkbox" id="login_auto_login" name="auto_login">
<label for="login_auto_login">자동로그인</label>
</fieldset>
<section>
<h2>회원로그인 안내</h2>
<p>
회원아이디 및 패스워드가 기억 안나실 때는 아이디/패스워드 찾기를 이용하십시오.<br>
아직 회원이 아니시라면 회원으로 가입 후 이용해 주십시오.
</p>
<div>
<a href="<?=$g4['bbs_url']?>/password_lost.php" id="login_password_lost" class="btn02" target="win_password_lost">아이디 패스워드 찾기</a>
<a href="./register.php" class="btn01">회원 가입</a>
</div>
</section>
<div class="btn_confirm">
<a href="<?=G4_URL?>/">메인으로 돌아가기</a>
</div>
</form>
</div>
<script>
$(function(){
$("#login_auto_login").click(function(){
if (this.checked) {
this.checked = confirm("자동로그인을 사용하시면 다음부터 회원아이디와 패스워드를 입력하실 필요가 없습니다.\n\n공공장소에서는 개인정보가 유출될 수 있으니 사용을 자제하여 주십시오.\n\n자동로그인을 사용하시겠습니까?");
}
});
});
function flogin_submit(f)
{
return true;
}
</script>

View File

@ -0,0 +1,5 @@
<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
// 자신만의 코드를 넣어주세요.
?>

View File

@ -0,0 +1,44 @@
<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>
<div id="mb_confirm">
<h1><?=$g4['title']?></h1>
<p>
<strong>패스워드를 한번 더 입력해주세요.</strong>
회원님의 정보를 안전하게 보호하기 위해 패스워드를 한번 더 확인합니다.
</p>
<form name="fmemberconfirm" method="post" onsubmit="return fmemberconfirm_submit(this);">
<input type=hidden name="mb_id" value="<?=$member[mb_id]?>">
<input type=hidden name="w" value="u">
<fieldset>
회원아이디
<span id="mb_confirm_id"><?=$member[mb_id]?></span>
<label for="confirm_mb_password">패스워드<strong class="sound_only">필수</strong></label>
<input type="password" id="confirm_mb_password" name="mb_password" class="fs_input" maxLength="20" size="15" required>
<input type="submit" id="btn_submit" class="fs_submit" value="확인">
</fieldset>
</form>
<div class="btn_confirm">
<a href="<?=G4_URL?>">메인으로 돌아가기</a>
</div>
</div>
<script>
document.onload = document.fmemberconfirm.mb_password.focus();
function fmemberconfirm_submit(f)
{
document.getElementById("btn_submit").disabled = true;
f.action = "<?=$url?>";
return true;
}
</script>

View File

@ -0,0 +1,44 @@
<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>
<div id="memo_list" class="new_win">
<h1><?=$g4['title']?></h1>
<ul class="new_win_ul">
<li><a href="./memo.php?kind=recv">받은쪽지</a></li>
<li><a href="./memo.php?kind=send">보낸쪽지</a></li>
<li><a href="./memo_form.php">쪽지쓰기</a></li>
</ul>
<table class="basic_tbl">
<caption>
전체 <?=$kind_title?>쪽지 <?=$total_count?>통<br>
</caption>
<thead>
<tr>
<th scope="col"><?= ($kind == "recv") ? "보낸사람" : "받는사람"; ?></th>
<th scope="col">보낸시간</th>
<th scope="col">읽은시간</th>
<th scope="col">관리</th>
</tr>
</thead>
<tbody>
<? for ($i=0; $i<count($list); $i++) { ?>
<tr>
<td><div><?=$list[$i]['name']?></div></td>
<td class="td_datetime"><a href="<?=$list[$i]['view_href']?>"><?=$list[$i]['send_datetime']?></font></td>
<td class="td_datetime"><a href="<?=$list[$i]['view_href']?>"><?=$list[$i]['read_datetime']?></font></td>
<td class="td_mng"><a href="<?=$list[$i]['del_href']?>" onclick="del(this.href); return false;">삭제</a></td>
</tr>
<? } ?>
<? if ($i==0) { echo "<tr><td colspan=\"4\" class=\"empty_table\">자료가 없습니다.</td></tr>"; } ?>
</tbody>
</table>
<p class="new_win_desc">
쪽지 보관일수는 최장 <strong><?=$config['cf_memo_del']?></strong>일 입니다.
</p>
<div class="btn_win"><a href="javascript:;" onclick="window.close();">창닫기</a></div>
</div>

View File

@ -0,0 +1,54 @@
<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>
<div id="memo_write" class="new_win">
<h1>쪽지보내기</h1>
<ul class="new_win_ul">
<li><a href="./memo.php?kind=recv">받은쪽지</a></li>
<li><a href="./memo.php?kind=send">보낸쪽지</a></li>
<li><a href="./memo_form.php">쪽지쓰기</a></li>
</ul>
<div class="cbox">
<form name="fmemoform" method="post" action="./memo_form_update.php" onsubmit="return fmemoform_submit(this);" autocomplete="off">
<table class="frm_tbl">
<caption>쪽지쓰기</caption>
<tbody>
<tr>
<th scope="row"><label for="me_recv_mb_id">받는 회원아이디<strong class="sound_only">필수</strong></label></th>
<td>
<input type="text" id="me_recv_mb_id" name="me_recv_mb_id" class="frm_input required" size="47" required value="<?=$me_recv_mb_id?>">
<span class="frm_info">여러 회원에게 보낼때는 컴마(,)로 구분하세요.</span>
</td>
</tr>
<tr>
<th scope="row"><label for="me_memo">내용</label></th>
<td><textarea id="me_memo" name="me_memo" required><?=$content?></textarea></td>
</tr>
<tr>
<th scope="row">자동등록방지</th>
<td>
<?=captcha_html();?>
</td>
</tr>
</tbody>
</table>
</div>
<div class="btn_win">
<input type="submit" id="btn_submit" class="btn_submit" value="보내기">
<a href="javascript:;" onclick="window.close();">창닫기</a>
</div>
</form>
</div>
<script>
function fmemoform_submit(f)
{
<? echo chk_captcha_js(); ?>
return true;
}
</script>

View File

@ -0,0 +1,48 @@
<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
$nick = get_sideview($mb['mb_id'], $mb['mb_nick'], $mb['mb_email'], $mb['mb_homepage']);
if($kind == "recv") {
$kind_str = "보낸";
$kind_date = "받은";
}
else {
$kind_str = "받는";
$kind_date = "보낸";
}
?>
<div id="memo_view" class="new_win">
<h1><?=$g4['title']?></h1>
<ul class="new_win_ul">
<li><a href="./memo.php?kind=recv">받은쪽지</a></li>
<li><a href="./memo.php?kind=send">보낸쪽지</a></li>
<li><a href="./memo_form.php">쪽지쓰기</a></li>
</ul>
<section>
<h2>쪽지 내용</h2>
<ul id="memo_view_ul">
<li class="memo_view_li">
<span class="memo_view_subj"><?=$kind_str?>사람</span>
<strong><?=$nick?></strong>
</li>
<li class="memo_view_li">
<span class="memo_view_subj"><?=$kind_date?>시간</span>
<strong><?=$memo['me_send_datetime']?></strong>
</li>
</ul>
<p>
<?=conv_content($memo['me_memo'], 0)?>
</p>
</section>
<div class="btn_win">
<? if($prev_link) { ?>
<a href="<?=$prev_link?>">이전쪽지</a>
<? } ?>
<? if($next_link) { ?>
<a href="<?=$next_link?>">다음쪽지</a>
<? } ?>
<? if ($kind == 'recv') { ?><a href="./memo_form.php?me_recv_mb_id=<?=$mb['mb_id']?>&amp;me_id=<?=$memo['me_id']?>" class="btn01">답장</a><? } ?>
<a href="./memo.php?kind=<?=$kind?>">목록보기</a>
<a href="javascript:;" onclick="window.close();">창닫기</a>
</div>
</div>

View File

@ -0,0 +1,49 @@
<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
$delete_str = "";
if ($w == 'x') $delete_str = "";
if ($w == 'u') $g4['title'] = $delete_str."글 수정";
else if ($w == 'd' || $w == 'x') $g4['title'] = $delete_str."글 삭제";
else $g4['title'] = $g4['title'];
?>
<div id="pw_confirm">
<h1><?=$g4['title']?></h1>
<p>
<? if ($w == 'u') {?>
<strong>작성자만 글을 수정할 수 있습니다.</strong>
작성자 본인이라면, 글 작성시 입력한 패스워드를 입력하여 글을 수정할 수 있습니다.
<? } else if ($w == 'd' || $w == 'x') { ?>
<strong>작성자만 글을 삭제할 수 있습니다.</strong>
작성자 본인이라면, 글 작성시 입력한 패스워드를 입력하여 글을 삭제할 수 있습니다.
<? } else { ?>
<strong>비밀글 기능으로 보호된 글입니다.</strong>
작성자와 관리자만 열람하실 수 있습니다. 본인이라면 패스워드를 입력하세요.
<? } ?>
</p>
<form name="fboardpassword" method="post" action="<? echo $action; ?>">
<input type="hidden" name="w" value="<?=$w?>">
<input type="hidden" name="bo_table" value="<?=$bo_table?>">
<input type="hidden" name="wr_id" value="<?=$wr_id?>">
<input type="hidden" name="comment_id" value="<?=$comment_id?>">
<input type="hidden" name="sfl" value="<?=$sfl?>">
<input type="hidden" name="stx" value="<?=$stx?>">
<input type="hidden" name="page" value="<?=$page?>">
<fieldset>
<label for="password_wr_password">패스워드<strong class="sound_only">필수</strong></label>
<input type="password" id="password_wr_password" name="wr_password" class="fs_input required" maxLength="20" size="15" required>
<input type="submit" class="fs_submit" value="확인">
</fieldset>
</form>
<div class="btn_confirm">
<a href="<?=$_SERVER['HTTP_REFERER']?>">돌아가기</a>
</div>
</div>
<script>
document.fboardpassword.wr_password.focus();
</script>

Some files were not shown because too many files have changed in this diff Show More