function dates_format($sdate, $edate) { $syear = JDate::year($sdate); $eyear = JDate::year($edate); $ret = JDate::date_format($sdate, 'Y m月d日') . " ~ "; if ($syear == $eyear) { $ret .= JDate::date_format($edate, 'm月d日'); } else { $ret .= JDate::date_format($edate, 'Y m月d日'); } return $ret; }
function textNewsStyleS($d = null) { if ($d != null) { ?> <a href="news_cnt.php?id=<?php echo $d->id; ?> "></a> <div class="metro-art"> <hgroup> <h1 class="news-title"><?php echo $d->title; ?> </h1> <p class="news-time"><?php echo JDate::date_format($d->date, 'm月d日 Y'); ?> </p> </hgroup> <p class="news-shrink_text"> <?php echo JWStdio::strip_truncate($d->content, 154); ?> </p> </div> <?php } else { ?> <a href="Javascript:void(0);"></a> <div class="metro-art"> <hgroup> <h1 class="news-title"></h1> <p class="news-time"></p> </hgroup> <p class="news-shrink_text"></p> </div> <?php } }
?> banner-news.jpg')"> </section> <main class=""> <header class="cnt_title"> <div class="wrapper small"> <h2 class="news-title"> <?php echo $news->data['title']; ?> </h2> <p class="news-time"> <?php echo JDate::date_format($news->data['date'], 'm月d日 Y'); ?> </p> </div> </header> <section class="fullbg row2"> <div class="bg"></div> <div class="wrapper"> <div class="cnt cf"> <article class="editorDF"> <?php echo $news->data['content']; ?> </article> <!--<img src="<?php ?>
function textNewsStyle1($d = null) { if ($d != null) { ?> <a href="news_cnt.php?id=<?php echo $d->id; ?> "></a> <div class="news-pic pic left"> <img src="<?php echo $d->icon; ?> " /> </div> <div class="metro-art right"> <hgroup> <h1 class="news-title"><?php echo $d->title; ?> </h1> <p class="news-time"><?php echo JDate::date_format($d->date, 'm月d日 Y'); ?> </p> </hgroup> <p class="news-shrink_text"> <?php echo JWStdio::strip_truncate($d->content, 154); ?> </p> </div> <?php } else { ?> <a href="Javascript:void(0);"></a> <div class="news-pic pic left"> <img src="dist/images/news-cover.jpg" /> </div> <div class="metro-art right"> <hgroup> <h1 class="news-title"></h1> <p class="news-time"></p> </hgroup> <p class="news-shrink_text"> </p> </div> <?php } }
<ul class="art_search-list"> <?php foreach ($pager->rsData as $d) { ?> <li class="art_search-item cf"> <div class="news-pic pic left"> <img src="upload/news/news_051701.jpg" alt=""> </div> <div class="news-intro left"> <hgroup class="cnt_title"> <h1 class="news-title"><?php echo $d->title; ?> ?</h1> <p class="news-time"><?php echo JDate::date_format($d->date, 'm月d日 Y'); ?> </p> </hgroup> <p class="news-shrink_text"> <?php echo JWStdio::strip_truncate($d->content, 154); ?> </p> <div class="news-link"> <a href="news_cnt.php?id=<?php echo $d->id; ?> " class="btn btn-black btn-more">繼續閱讀</a> </div> </div>