191 lines
11 KiB
PHP
Executable File
191 lines
11 KiB
PHP
Executable File
<?php $this->load->view('templates/news/news-header')?>
|
|
|
|
<main id="main" role="main" tabindex="-1">
|
|
<div class="container">
|
|
<div class="layout-blog">
|
|
<div>
|
|
<section class="news-main">
|
|
<a href="<?php echo $sortByPosted[0]->articleURL?>"><img
|
|
src="<?php echo $sortByPosted[0]->postImage?>"></a>
|
|
<div class="newsCont">
|
|
<h2><a
|
|
href="<?php echo $sortByPosted[0]->articleURL?>"><?php echo $sortByPosted[0]->postTitle?></a>
|
|
</h2>
|
|
<p><a href="<?php echo $sortByPosted[0]->articleURL?>">
|
|
<?php echo $sortByPosted[0]->postExcerpt?>
|
|
</a></p>
|
|
<ul>
|
|
<li><a
|
|
href="<?php echo $sortByPosted[1]->articleURL?>"><?php echo $sortByPosted[1]->postTitle?></a>
|
|
</li>
|
|
<li><a
|
|
href="<?php echo $sortByPosted[2]->articleURL?>"><?php echo $sortByPosted[2]->postTitle?></a>
|
|
</li>
|
|
<li><a
|
|
href="<?php echo $sortByPosted[3]->articleURL?>"><?php echo $sortByPosted[3]->postTitle?></a>
|
|
</li>
|
|
<li><a
|
|
href="<?php echo $sortByPosted[4]->articleURL?>"><?php echo $sortByPosted[4]->postTitle?></a>
|
|
</li>
|
|
<li><a
|
|
href="<?php echo $sortByPosted[5]->articleURL?>"><?php echo $sortByPosted[5]->postTitle?></a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</section>
|
|
<!--교회/교계-->
|
|
<?php
|
|
foreach(NEWS_SECTION_CATEGORY as $sn => $sc) {
|
|
$contentSection = ($sn == 'opinions'? 'channel' : 'news');
|
|
if(!count($posts[$sn]))continue;
|
|
?>
|
|
<div class="newsHome">
|
|
<div class="title"><a href="#"><?php echo $posts[$sn][0]->sectionCategory['title']?></a></div>
|
|
<div class="newsHomeBox">
|
|
<div class="newsPhoto">
|
|
<a
|
|
href="/<?php echo $contentSection?>/<?php echo $sn == 'opinions'? $posts[$sn][0]->pageID:$sn?>/<?php echo $posts[$sn][0]->postID?>"><img
|
|
src="<?php echo $posts[$sn][0]->postImage?>"></a>
|
|
<div class="caption"><?php echo $posts[$sn][0]->postTitle?></div>
|
|
</div>
|
|
|
|
<ul>
|
|
<?php
|
|
for($i=1;$i<7;$i++) {
|
|
?>
|
|
<li><a
|
|
href="/<?php echo $contentSection?>/<?php echo $sn == 'opinions'? $posts[$sn][0]->pageID:$sn?>/<?php echo $posts[$sn][$i]->postID?>"><?php echo $posts[$sn][$i]->postTitle?></a>
|
|
</li>
|
|
<?php }?>
|
|
</ul>
|
|
|
|
</div>
|
|
</div>
|
|
<?php }?>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<!-- side bar -->
|
|
<div class="sidebar">
|
|
<div class="ad gap-bottom-sm"><a href=""><img
|
|
src="https://crossmap.co.kr/files/advertisement/2019/04/b65bc12d9a44a20ea93b4680a800652c.png"
|
|
alt="" width="300" height="260"></a></div>
|
|
|
|
<section class="realtime-rank gap-bottom-md" id="list">
|
|
<header class="row-header">
|
|
<h2>많이 본 뉴스</h2>
|
|
<div class="viewall">
|
|
<span>
|
|
<a href="javascript:sideNewsRankNav(-1)"><img
|
|
src="<?php echo THEME_FOLDER?>/img/img_section_left.jpg"></a><a
|
|
href="javascript:sideNewsRankNav(1)"><img
|
|
src="<?php echo THEME_FOLDER?>/img/img_section_right.jpg"></a>
|
|
</span>
|
|
</div>
|
|
</header>
|
|
<div class="rank-list">
|
|
<ol class="col-item side-news-rank page1">
|
|
<?php
|
|
for ($i = 0; $i < 9; $i++) {
|
|
echo '<li><a href="'.$hotNews[$i]->articleURL. '">' . $hotNews[$i]->postTitle . '</a></li>';
|
|
}
|
|
?>
|
|
</ol>
|
|
<ol class="col-item side-news-rank page2" start="10">
|
|
<?php
|
|
for ($i = 9; $i < 18; $i++) {
|
|
echo '<li><a href="'.$hotNews[$i]->articleURL. '">' . $hotNews[$i]->postTitle . '</a></li>';
|
|
}
|
|
?>
|
|
</ol>
|
|
<ol class="col-item side-news-rank page3" start="20">
|
|
<?php
|
|
for ($i = 18; $i < 27; $i++) {
|
|
echo '<li><a href="'.$hotNews[$i]->articleURL. '">' . $hotNews[$i]->postTitle . '</a></li>';
|
|
}
|
|
?>
|
|
</ol>
|
|
</div>
|
|
</section>
|
|
|
|
<!--오늘의 포토-->
|
|
<div class="todayPhoto">
|
|
<h4>
|
|
<a href="#">오늘의 포토</a>
|
|
</h4>
|
|
<div class="photoBox"
|
|
style="background:url('<?php echo $photoNews[0]->postImage?>') no-repeat center; background-size:cover;">
|
|
<div class="bg"></div>
|
|
|
|
<h5><a href="/channel/<?php echo $photoNews[0]->pageID?>/<?php echo $photoNews[0]->postID?>"
|
|
class="cm-photo-news-link"><?php echo $photoNews[0]->postTitle?></a></h5>
|
|
|
|
<ul>
|
|
<li class="current"
|
|
itemref="/channel/<?php echo $photoNews[0]->pageID?>/<?php echo $photoNews[0]->postID?>"
|
|
title="<?php echo $photoNews[0]->postTitle?>"
|
|
contextmenu="<?php echo $photoNews[0]->postImage?>"
|
|
style="background:url('<?php echo $photoNews[0]->postImage?>') no-repeat center; background-size:cover;">
|
|
</li>
|
|
<li itemref="/channel/<?php echo $photoNews[1]->pageID?>/<?php echo $photoNews[1]->postID?>"
|
|
title="<?php echo $photoNews[1]->postTitle?>"
|
|
contextmenu="<?php echo $photoNews[1]->postImage?>"
|
|
style="background:url('<?php echo $photoNews[1]->postImage?>') no-repeat center; background-size:cover;">
|
|
</li>
|
|
<li itemref="/channel/<?php echo $photoNews[2]->pageID?>/<?php echo $photoNews[2]->postID?>"
|
|
title="<?php echo $photoNews[2]->postTitle?>"
|
|
contextmenu="<?php echo $photoNews[2]->postImage?>"
|
|
style="background:url('<?php echo $photoNews[2]->postImage?>') no-repeat center; background-size:cover;">
|
|
</li>
|
|
</ul>
|
|
|
|
<div class="control">
|
|
<div class="arrowPrev"><i class="fas fa-chevron-left"></i></div>
|
|
<div class="arrowNext"><i class="fas fa-chevron-right"></i></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!--기도소식-->
|
|
<div class="sideBox">
|
|
<h4>
|
|
<a href="#">기도소식</a>
|
|
</h4>
|
|
<ul>
|
|
<li class="current"
|
|
style="background:url('<?php echo $prayNews[0]->postImage?>') no-repeat center; background-size:cover;">
|
|
<a
|
|
href="/channel/<?php echo $prayNews[0]->pageID?>/<?php echo $prayNews[0]->postID?>"><?php echo $prayNews[0]->postTitle?></a>
|
|
</li>
|
|
<li
|
|
style="background:url('<?php echo $prayNews[1]->postImage?>') no-repeat center; background-size:cover;">
|
|
<a
|
|
href="/channel/<?php echo $prayNews[1]->pageID?>/<?php echo $prayNews[1]->postID?>"><?php echo $prayNews[1]->postTitle?></a>
|
|
</li>
|
|
<li
|
|
style="background:url('<?php echo $prayNews[2]->postImage?>') no-repeat center; background-size:cover;">
|
|
<a
|
|
href="/channel/<?php echo $prayNews[2]->pageID?>/<?php echo $prayNews[2]->postID?>"><?php echo $prayNews[2]->postTitle?></a>
|
|
</li>
|
|
<li
|
|
style="background:url('<?php echo $prayNews[3]->postImage?>') no-repeat center; background-size:cover;">
|
|
<a
|
|
href="/channel/<?php echo $prayNews[3]->pageID?>/<?php echo $prayNews[3]->postID?>"><?php echo $prayNews[3]->postTitle?></a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<!--banner-->
|
|
<div class="ad gap-bottom-sm"><a href=""><img src="<?php echo THEME_FOLDER?>/img/bn-300-webtoon.jpg"
|
|
alt="" width="300"></a></div>
|
|
|
|
<div class="ad gap-bottom-sm"><a href=""><img src="<?php echo THEME_FOLDER?>/img/bn-300-grace.jpg"
|
|
alt="" width="300"></a></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</main>
|
|
<?php $this->load->view('templates/news/news-footer')?>
|