first
This commit is contained in:
42
modules/bbs/mod/_list.php
Normal file
42
modules/bbs/mod/_list.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
$bbsque0 = 'site='.$s;
|
||||
$bbsque1 = 'site='.$s.' and notice=1';
|
||||
$bbsque2 = 'site='.$s.' and notice=0';
|
||||
|
||||
if ($B['uid'])
|
||||
{
|
||||
$bbsque0 .= ' and bbs='.$B['uid'];
|
||||
$bbsque1 .= ' and bbs='.$B['uid'];
|
||||
$bbsque2 .= ' and bbs='.$B['uid'];
|
||||
}
|
||||
|
||||
$RCD = array();
|
||||
$NCD = array();
|
||||
|
||||
$NTC = getDbArray($table[$m.'idx'],$bbsque1,'gid','gid',$orderby,0,0);
|
||||
while($_R = db_fetch_array($NTC)) $NCD[] = getDbData($table[$m.'data'],'gid='.$_R['gid'],'*');
|
||||
|
||||
$NUM_NOTICE = count($NCD);
|
||||
|
||||
if ($sort == 'gid' && !$keyword && !$cat)
|
||||
{
|
||||
$NUM = getDbCnt($table[$m.'month'],'sum(num)',$bbsque0)-count($NCD);
|
||||
$TCD = getDbArray($table[$m.'idx'],$bbsque2,'gid',$sort,$orderby,$recnum,$p);
|
||||
while($_R = db_fetch_array($TCD)) $RCD[] = getDbData($table[$m.'data'],'gid='.$_R['gid'],'*');
|
||||
}
|
||||
else {
|
||||
if ($cat) $bbsque2 .= " and category='".$cat."'";
|
||||
if ($where && $keyword)
|
||||
{
|
||||
if (strpos('[name][nic][id][ip]',$where)) $bbsque2 .= " and ".$where."='".$keyword."'";
|
||||
else if ($where == 'term') $bbsque2 .= " and d_regis like '".$keyword."%'";
|
||||
else $bbsque2 .= getSearchSql($where,$keyword,$ikeyword,'or');
|
||||
}
|
||||
$NUM = getDbRows($table[$m.'data'],$bbsque2);
|
||||
$TCD = getDbArray($table[$m.'data'],$bbsque2,'*',$sort,$orderby,$recnum,$p);
|
||||
while($_R = db_fetch_array($TCD)) $RCD[] = $_R;
|
||||
}
|
||||
$TPG = getTotalPage($NUM,$recnum);
|
||||
?>
|
||||
53
modules/bbs/mod/_permcheck.php
Normal file
53
modules/bbs/mod/_permcheck.php
Normal file
@@ -0,0 +1,53 @@
|
||||
<?php if ($g['mobile']&&$_SESSION['pcmode']!='Y'): ?>
|
||||
<header class="bar bar-nav bar-light bg-faded">
|
||||
<a class="icon icon-left-nav pull-left" role="button" data-history="back"></a>
|
||||
<h1 class="title"><?php echo $B['name'] ?></h1>
|
||||
</header>
|
||||
<div class="content">
|
||||
<div class="content-padded text-xs-center text-muted pt-5">
|
||||
|
||||
<h3 class="">
|
||||
<div class="d-block mb-3"><i class="fa fa-exclamation-circle fa-lg fa-2x"></i></div>
|
||||
서비스 안내
|
||||
</h3>
|
||||
|
||||
<ul class="list-unstyled text-left mt-4 small">
|
||||
<?php if ($my['uid']): ?>
|
||||
<li>요청하신 게시판의 접근권한이 없습니다.</li>
|
||||
<?php else: ?>
|
||||
<li>요청하신 게시판에는 권한이 있어야 접근하실 수 있습니다.</li>
|
||||
<li>로그인 후에 이용하세요.</li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
<?php if (!$my['uid']): ?>
|
||||
<button type="button" class="btn btn-outline-primary btn-block mt-3" data-toggle="modal" data-target="#modal-login">로그인 하기</button>
|
||||
<?php endif; ?>
|
||||
|
||||
<button type="button" class="btn btn-secondary btn-block mt-2" data-history="back">이전가기</button>
|
||||
|
||||
</div>
|
||||
</div><!-- /.content -->
|
||||
|
||||
<?php else: ?>
|
||||
<div class="mt-5 mx-auto w-50 text-center text-center text-muted">
|
||||
|
||||
<h3 class="mb-3">
|
||||
<div class="d-block mb-3"><i class="fa fa-exclamation-circle fa-lg fa-3x"></i></div>
|
||||
서비스 안내
|
||||
</h3>
|
||||
|
||||
<ul class="list-unstyled my-4">
|
||||
<?php if ($my['uid']): ?>
|
||||
<li>요청하신 게시판의 접근권한이 없습니다.</li>
|
||||
<?php else: ?>
|
||||
<li>요청하신 게시판에는 권한이 있어야 접근하실 수 있습니다.</li>
|
||||
<li>로그인 후에 이용하세요.</li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
<?php if (!$my['uid']): ?>
|
||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#modal-login">로그인 하기</button>
|
||||
<?php endif; ?>
|
||||
<button type="button" class="btn btn-light" onclick="history.back();">이전가기</button>
|
||||
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
87
modules/bbs/mod/_pointcheck.php
Normal file
87
modules/bbs/mod/_pointcheck.php
Normal file
@@ -0,0 +1,87 @@
|
||||
|
||||
<div class="card w-75 mx-auto my-5">
|
||||
<div class="card-header">
|
||||
<?php echo $R['subject']?> - <?php echo $R[$_HS['nametype']]?>님
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
<ul>
|
||||
<li>요청하신 게시물은 열람시 포인트가 차감됩니다.</li>
|
||||
<?php if($my['uid']):?>
|
||||
<li>열람에 필요한 포인트는 <span class="text-danger"><?php echo number_format($R['point2'])?> 포인트</span> 이며 회원님은 현재 <span class="text-primary"><?php echo number_format($my['point'])?> 포인트</span> 보유 중입니다.</li>
|
||||
<?php else:?>
|
||||
<li>회원으로 로그인하셔야 이용하실 수 있습니다. 로그인해 주세요.</li>
|
||||
<?php endif?>
|
||||
<li>한번 열람한 게시물은 브라우져를 모두 닫을때까지 재결제 없이 열람할 수 있습니다.</li>
|
||||
<?php if($my['admin']):?>
|
||||
<li class="b"><?php echo $my[$_HS['nametype']]?>님은 관리자권한으로 포인트는 차감되지 않습니다.</li>
|
||||
<?php endif?>
|
||||
<?php if($my['uid']==$R['mbruid']):?>
|
||||
<li class="b"><?php echo $my[$_HS['nametype']]?>님은 게시물 등록자이므로 실제 포인트는 차감되지 않습니다.</li>
|
||||
<?php endif?>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="card-footer text-center">
|
||||
<button type="button" class="btn btn-light btn-lg" onclick="history.back();" >
|
||||
돌아가기
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary btn-lg" onclick="viewArticle();">
|
||||
열람하기 <span class="badge badge-light"><?php echo number_format($R['point2'])?> 포인트 차감</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div><!-- /.card -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<form name="checkForm" method="post" action="<?php echo $g['s']?>/" target="_action_frame_<?php echo $m?>" onsubmit="return permCheck(this);">
|
||||
<input type="hidden" name="r" value="<?php echo $r?>" />
|
||||
<input type="hidden" name="a" value="point_view" />
|
||||
<input type="hidden" name="c" value="<?php echo $c?>" />
|
||||
<input type="hidden" name="cuid" value="<?php echo $_HM['uid']?>" />
|
||||
<input type="hidden" name="m" value="<?php echo $m?>" />
|
||||
<input type="hidden" name="bid" value="<?php echo $R['bbsid']?>" />
|
||||
<input type="hidden" name="uid" value="<?php echo $R['uid']?>" />
|
||||
|
||||
<input type="hidden" name="p" value="<?php echo $p?>" />
|
||||
<input type="hidden" name="cat" value="<?php echo $cat?>" />
|
||||
<input type="hidden" name="sort" value="<?php echo $sort?>" />
|
||||
<input type="hidden" name="orderby" value="<?php echo $orderby?>" />
|
||||
<input type="hidden" name="recnum" value="<?php echo $recnum?>" />
|
||||
<input type="hidden" name="type" value="<?php echo $type?>" />
|
||||
<input type="hidden" name="iframe" value="<?php echo $iframe?>" />
|
||||
<input type="hidden" name="skin" value="<?php echo $skin?>" />
|
||||
<input type="hidden" name="where" value="<?php echo $where?>" />
|
||||
<input type="hidden" name="keyword" value="<?php echo $_keyword?>" />
|
||||
</form>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function viewArticle()
|
||||
{
|
||||
var f = document.checkForm;
|
||||
if (memberid == '')
|
||||
{
|
||||
alert('로그인하신 후에 이용해 주세요. ');
|
||||
return false;
|
||||
}
|
||||
<?php if($my['point'] < $R['point2']):?>
|
||||
if (memberid == '')
|
||||
{
|
||||
alert('회원님의 보유포인트가 열람포인트보다 적습니다. ');
|
||||
return false;
|
||||
}
|
||||
<?php endif?>
|
||||
if (confirm('정말로 열람하시겠습니까? '))
|
||||
{
|
||||
f.submit();
|
||||
}
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
113
modules/bbs/mod/_pwcheck.php
Normal file
113
modules/bbs/mod/_pwcheck.php
Normal file
@@ -0,0 +1,113 @@
|
||||
<?php if ($g['mobile']&&$_SESSION['pcmode']!='Y'): ?>
|
||||
<header class="bar bar-nav bar-light bg-faded">
|
||||
<a class="icon icon-left-nav pull-left" role="button" data-history="back"></a>
|
||||
<h1 class="title"><?php echo $B['name'] ?></h1>
|
||||
</header>
|
||||
<div class="content">
|
||||
|
||||
<form name="checkForm" method="post" class="form-horizontal rb-form" action="<?php echo $g['s']?>/" target="_action_frame_<?php echo $m?>" onsubmit="return permCheck(this);">
|
||||
<input type="hidden" name="r" value="<?php echo $r?>" />
|
||||
<input type="hidden" name="a" value="<?php echo $mod=='delete'?$mod:'pwcheck'?>" />
|
||||
<input type="hidden" name="c" value="<?php echo $c?>" />
|
||||
<input type="hidden" name="cuid" value="<?php echo $_HM['uid']?>" />
|
||||
<input type="hidden" name="m" value="<?php echo $m?>" />
|
||||
<input type="hidden" name="bid" value="<?php echo $R['bbsid']?$R['bbsid']:$bid?>" />
|
||||
<input type="hidden" name="uid" value="<?php echo $R['uid']?>" />
|
||||
|
||||
<input type="hidden" name="p" value="<?php echo $p?>" />
|
||||
<input type="hidden" name="cat" value="<?php echo $cat?>" />
|
||||
<input type="hidden" name="sort" value="<?php echo $sort?>" />
|
||||
<input type="hidden" name="orderby" value="<?php echo $orderby?>" />
|
||||
<input type="hidden" name="recnum" value="<?php echo $recnum?>" />
|
||||
<input type="hidden" name="type" value="<?php echo $type?>" />
|
||||
<input type="hidden" name="iframe" value="<?php echo $iframe?>" />
|
||||
<input type="hidden" name="skin" value="<?php echo $skin?>" />
|
||||
<input type="hidden" name="where" value="<?php echo $where?>" />
|
||||
<input type="hidden" name="keyword" value="<?php echo $_keyword?>" />
|
||||
|
||||
|
||||
<div class="input-group input-group-lg my-4">
|
||||
<input type="text" class="form-control" type="password" name="pw">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-outline-secondary" type="submit">확인</button>
|
||||
</div>
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-outline-secondary" type="button" onclick="history.go(-1);">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
</div><!-- /.content -->
|
||||
<?php else: ?>
|
||||
<section class="d-flex justify-content-center align-items-center" style="height: 50vh;">
|
||||
|
||||
<div class="card w-50">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-lock fa-lg"></i> 비밀번호 확인
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form name="checkForm" method="post" class="form-horizontal rb-form" action="<?php echo $g['s']?>/" target="_action_frame_<?php echo $m?>" onsubmit="return permCheck(this);">
|
||||
<input type="hidden" name="r" value="<?php echo $r?>" />
|
||||
<input type="hidden" name="a" value="<?php echo $mod=='delete'?$mod:'pwcheck'?>" />
|
||||
<input type="hidden" name="c" value="<?php echo $c?>" />
|
||||
<input type="hidden" name="cuid" value="<?php echo $_HM['uid']?>" />
|
||||
<input type="hidden" name="m" value="<?php echo $m?>" />
|
||||
<input type="hidden" name="bid" value="<?php echo $R['bbsid']?$R['bbsid']:$bid?>" />
|
||||
<input type="hidden" name="uid" value="<?php echo $R['uid']?>" />
|
||||
|
||||
<input type="hidden" name="p" value="<?php echo $p?>" />
|
||||
<input type="hidden" name="cat" value="<?php echo $cat?>" />
|
||||
<input type="hidden" name="sort" value="<?php echo $sort?>" />
|
||||
<input type="hidden" name="orderby" value="<?php echo $orderby?>" />
|
||||
<input type="hidden" name="recnum" value="<?php echo $recnum?>" />
|
||||
<input type="hidden" name="type" value="<?php echo $type?>" />
|
||||
<input type="hidden" name="iframe" value="<?php echo $iframe?>" />
|
||||
<input type="hidden" name="skin" value="<?php echo $skin?>" />
|
||||
<input type="hidden" name="where" value="<?php echo $where?>" />
|
||||
<input type="hidden" name="keyword" value="<?php echo $_keyword?>" />
|
||||
|
||||
|
||||
<div class="input-group input-group-lg my-4">
|
||||
<input type="text" class="form-control" type="password" name="pw">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-outline-secondary" type="submit">확인</button>
|
||||
</div>
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-outline-secondary" type="button" onclick="history.go(-1);">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div> <!-- .panel-body -->
|
||||
<div class="card-footer text-muted">
|
||||
게시물 등록시에 입력했던 비밀번호를 입력해 주세요.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
<?php endif; ?>
|
||||
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
var checkFlag = false;
|
||||
function permCheck(f)
|
||||
{
|
||||
if (checkFlag == true)
|
||||
{
|
||||
alert('확인중입니다. 잠시만 기다려 주세요. ');
|
||||
return false;
|
||||
}
|
||||
|
||||
if (f.pw.value == '')
|
||||
{
|
||||
alert('비밀번호를 입력해 주세요. ');
|
||||
f.pw.focus();
|
||||
return false;
|
||||
}
|
||||
checkFlag = true;
|
||||
}
|
||||
window.onload = function(){document.checkForm.pw.focus();}
|
||||
//]]>
|
||||
</script>
|
||||
131
modules/bbs/mod/_rss.php
Normal file
131
modules/bbs/mod/_rss.php
Normal file
@@ -0,0 +1,131 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
if(!$d['bbs']['rss'])
|
||||
{
|
||||
getLink('','','RSS발행을 지원하지 않는 게시판입니다.','close');
|
||||
}
|
||||
|
||||
if($bid)
|
||||
{
|
||||
$B = getDbData($table[$m.'list'],"id='".$bid."'",'*');
|
||||
}
|
||||
|
||||
$sort = 'gid';
|
||||
$orderby= 'asc';
|
||||
$recnum = 20;
|
||||
|
||||
$_QUE = 'site='.$s.' and hidden=0';
|
||||
if ($mbruid)
|
||||
{
|
||||
$_QUE .= ' and mbruid='.$mbruid;
|
||||
}
|
||||
if ($B['uid'])
|
||||
{
|
||||
$_QUE .= ' and bbs='.$B['uid'];
|
||||
}
|
||||
|
||||
$RCD = array();
|
||||
if ($mbruid)
|
||||
{
|
||||
$M=getDbData($table['s_mbrdata'],'memberuid='.$mbruid,'*');
|
||||
$TCD = getDbArray($table[$m.'data'],$_QUE,'*',$sort,$orderby,$recnum,$p);
|
||||
while($_R = db_fetch_array($TCD)) $RCD[] = $_R;
|
||||
}
|
||||
else {
|
||||
$TCD = getDbArray($table[$m.'data'],$_QUE,'gid',$sort,$orderby,$recnum,$p);
|
||||
while($_R = db_fetch_array($TCD)) $RCD[] = getDbData($table[$m.'data'],'gid='.$_R['gid'],'*');
|
||||
}
|
||||
Header("Content-type: text/xml");
|
||||
header("Cache-Control: no-cache, must-revalidate");
|
||||
header("Pragma: no-cache");
|
||||
echo "<?xml version='1.0' encoding='utf-8'?>\r\n\r\n";
|
||||
|
||||
if($type == 'rss1') :?>
|
||||
|
||||
<rss version='2.0' xmlns:dc='http://purl.org/dc/elements/1.1/'>
|
||||
<channel>
|
||||
<title><?php echo $mbruid?$M[$_HS['nametype']].'님의 포스트':(htmlspecialchars($B['name']?$B['name']:$_HS['name']))?></title>
|
||||
<link><?php echo $g['url_root']?>/?r=<?php echo $r?>&m=<?php echo $m?><?php if($B['uid']):?>&bid=<?php echo $B['id']?><?php endif?></link>
|
||||
<dc:language><?php echo substr($_HS['lang'],0,2)?></dc:language>
|
||||
<?php foreach($RCD as $R):?>
|
||||
<item>
|
||||
<title><?php echo htmlspecialchars($R['subject'])?></title>
|
||||
<description><![CDATA[<?php echo getContents($R['content'],$R['html'],'')?>]]></description>
|
||||
<link><?php echo $g['url_root']?>/?r=<?php echo $r?>&m=<?php echo $m?>&bid=<?php echo $R['bbsid']?>&uid=<?php echo $R['uid']?></link>
|
||||
<dc:creator><?php echo htmlspecialchars($R[$_HS['nametype']])?></dc:creator>
|
||||
<category><![CDATA[<?php echo htmlspecialchars($R['category'])?>]]></category>
|
||||
<?php if($R['tag']):?>
|
||||
<?php $tags=explode(',',trim($R['tag']))?>
|
||||
<?php $tagn=count($tags)?>
|
||||
<?php for($i = 0; $i < $tagn; $i++):if(!$tags[$i])continue?>
|
||||
<category><![CDATA[<?php echo htmlspecialchars($tags[$i])?>]]></category>
|
||||
<?php endfor?>
|
||||
<?php endif?>
|
||||
<guid><?php echo $g['url_root']?>/?r=<?php echo $r?>&m=<?php echo $m?>&bid=<?php echo $R['bbsid']?>&uid=<?php echo $R['uid']?></guid>
|
||||
<dc:date><?php echo getDateFormat($R['d_regis'],'r')?></dc:date>
|
||||
<dc:subject></dc:subject>
|
||||
</item>
|
||||
<?php endforeach?>
|
||||
</channel>
|
||||
</rss>
|
||||
|
||||
<?php elseif($type == 'atom') :?>
|
||||
|
||||
<feed version="0.3"
|
||||
xmlns="http://purl.org/atom/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/"
|
||||
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" >
|
||||
|
||||
<title><?php echo $mbruid?$M[$_HS['nametype']].'님의 포스트':(htmlspecialchars($B['name']?$B['name']:$_HS['name']))?></title>
|
||||
|
||||
<id><?php echo $g['url_root']?>/?r=<?php echo $r?>&m=<?php echo $m?><?php if($B['uid']):?>&bid=<?php echo $B['id']?><?php endif?></id>
|
||||
<author><name><?php echo htmlspecialchars($B['name']?$B['name']:$_HS['name'])?></name></author>
|
||||
<info><![CDATA[<?php echo htmlspecialchars($B['name']?$B['name']:$_HS['name'])?>]]></info>
|
||||
|
||||
<?php foreach($RCD as $R):?>
|
||||
<entry>
|
||||
<title><?php echo htmlspecialchars($R['subject'])?></title>
|
||||
<link rel="alternate" type="text/html" href="<?php echo $g['r']?>/?m=<?php echo $m?>&uid=<?php echo $R['uid']?>" />
|
||||
<id><?php echo $g['url_root']?>/?r=<?php echo $r?>&m=<?php echo $m?>&bid=<?php echo $R['bbsid']?>&uid=<?php echo $R['uid']?></id>
|
||||
<created><?php echo getDateFormat($R['d_regis'],'r')?></created>
|
||||
<modified><?php echo getDateFormat($R['d_modify'],'r')?></modified>
|
||||
<summary type="text/html" mode="escaped"><![CDATA[<?php echo getContents($R['content'],$R['html'],'')?>]]></summary>
|
||||
</entry>
|
||||
<?php endforeach?>
|
||||
|
||||
</feed>
|
||||
|
||||
|
||||
<?php else :?>
|
||||
|
||||
<rss version='2.0' xmlns:dc='http://purl.org/dc/elements/1.1/'>
|
||||
<channel>
|
||||
<title><?php echo $mbruid?$M[$_HS['nametype']].'님의 포스트':(htmlspecialchars($B['name']?$B['name']:$_HS['name']))?></title>
|
||||
<link><?php echo $g['url_root']?>/?r=<?php echo $r?>&m=<?php echo $m?><?php if($B['uid']):?>&bid=<?php echo $B['id']?><?php endif?></link>
|
||||
<dc:language><?php echo substr($_HS['lang'],0,2)?></dc:language>
|
||||
<?php foreach($RCD as $R):?>
|
||||
<item>
|
||||
<title><?php echo htmlspecialchars($R['subject'])?></title>
|
||||
<description><![CDATA[<?php echo getContents($R['content'],$R['html'],'')?>]]></description>
|
||||
<link><?php echo $g['url_root']?>/?r=<?php echo $r?>&m=<?php echo $m?>&bid=<?php echo $R['bbsid']?>&uid=<?php echo $R['uid']?></link>
|
||||
<dc:creator><?php echo htmlspecialchars($R[$_HS['nametype']])?></dc:creator>
|
||||
<category><![CDATA[<?php echo htmlspecialchars($R['category'])?>]]></category>
|
||||
<?php if($R['tag']):?>
|
||||
<?php $tags=explode(',',trim($R['tag']))?>
|
||||
<?php $tagn=count($tags)?>
|
||||
<?php for($i = 0; $i < $tagn; $i++):if(!$tags[$i])continue?>
|
||||
<category><![CDATA[<?php echo htmlspecialchars($tags[$i])?>]]></category>
|
||||
<?php endfor?>
|
||||
<?php endif?>
|
||||
<guid><?php echo $g['url_root']?>/?r=<?php echo $r?>&m=<?php echo $m?>&bid=<?php echo $R['bbsid']?>&uid=<?php echo $R['uid']?></guid>
|
||||
<dc:date><?php echo getDateFormat($R['d_regis'],'r')?></dc:date>
|
||||
<dc:subject></dc:subject>
|
||||
</item>
|
||||
<?php endforeach?>
|
||||
</channel>
|
||||
</rss>
|
||||
|
||||
<?php endif?>
|
||||
71
modules/bbs/mod/_view.php
Normal file
71
modules/bbs/mod/_view.php
Normal file
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
if (!$my['admin'] && !strstr(','.($d['bbs']['admin']?$d['bbs']['admin']:'.').',',','.$my['id'].','))
|
||||
{
|
||||
if ($d['bbs']['perm_l_view'] > $my['level'] || strpos('_'.$d['bbs']['perm_g_view'],'['.$my['mygroup'].']'))
|
||||
{
|
||||
$g['main'] = $g['dir_module'].'mod/_permcheck.php';
|
||||
$d['bbs']['isperm'] = false;
|
||||
}
|
||||
}
|
||||
if ($R['hidden'])
|
||||
{
|
||||
if ($my['uid'] != $R['mbruid'] && $my['uid'] != $R['pw'] && !$my['admin'])
|
||||
{
|
||||
if (!strpos('_'.$_SESSION['module_'.$m.'_pwcheck'],'['.$R['uid'].']'))
|
||||
{
|
||||
$g['main'] = $g['dir_module'].'mod/_pwcheck.php';
|
||||
$d['bbs']['isperm'] = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($d['bbs']['isperm'] && ($d['bbs']['hitcount'] || !strpos('_'.$_SESSION['module_'.$m.'_view'],'['.$R['uid'].']')))
|
||||
{
|
||||
if ($R['point2'])
|
||||
{
|
||||
$g['main'] = $g['dir_module'].'mod/_pointcheck.php';
|
||||
$d['bbs']['isperm'] = false;
|
||||
}
|
||||
else {
|
||||
getDbUpdate($table[$m.'data'],'hit=hit+1','uid='.$R['uid']);
|
||||
$_SESSION['module_'.$m.'_view'] .= '['.$R['uid'].']';
|
||||
}
|
||||
}
|
||||
if ($d['bbs']['isperm'] && $R['upload'])
|
||||
{
|
||||
$d['upload'] = array();
|
||||
$d['upload']['tmp'] = $R['upload'];
|
||||
$d['_pload'] = getArrayString($R['upload']);
|
||||
$attach_file_num=0;// 첨부파일 수량 체크 ---------------------------------> 2015.1.1 추가 by kiere.
|
||||
foreach($d['_pload']['data'] as $_val)
|
||||
{
|
||||
$U = getUidData($table['s_upload'],$_val);
|
||||
if (!$U['uid'])
|
||||
{
|
||||
$R['upload'] = str_replace('['.$_val.']','',$R['upload']);
|
||||
$d['_pload']['count']--;
|
||||
}
|
||||
else {
|
||||
$d['upload']['data'][] = $U;
|
||||
if (!$U['sync'])
|
||||
{
|
||||
$_SYNC = "sync='[".$m."][".$R['uid']."][uid,down][".$table[$m.'data']."][".$R['mbruid']."][m:".$m.",bid:".$R['bbsid'].",uid:".$R['uid']."]'";
|
||||
getDbUpdate($table['s_upload'],$_SYNC,'uid='.$U['uid']);
|
||||
}
|
||||
}
|
||||
if($U['hidden']==0) $attach_file_num++; // 숨김처리 안했으면 수량 ++
|
||||
}
|
||||
if ($R['upload'] != $d['upload']['tmp'])
|
||||
{
|
||||
// getDbUpdate($table[$m.'data'],"upload='".$R['upload']."'",'uid='.$R['uid']);
|
||||
}
|
||||
$d['upload']['count'] = $d['_pload']['count'];
|
||||
}
|
||||
|
||||
// 메타 이미지 세팅 = 해당 포스트의 대표 이미지를 메타 이미지로 적용한다.
|
||||
if($R['featured_img']){
|
||||
$g['meta_img']=getPreviewResize(getUpImageSrc($R),'600x450');
|
||||
}
|
||||
$mod = $mod ? $mod : 'view';
|
||||
$bid = $R['bbsid'];
|
||||
?>
|
||||
Reference in New Issue
Block a user