コード例 #1
0
ファイル: allNews.php プロジェクト: R-thomas/shopMob
        
        <?php 
foreach ($model as $item) {
    echo '<div class="row news_item">
                        <a href="/main/news/' . $item->id . '">
                            <div class="col-md-40 col-sm-120 col-xs-120 news_img_contaner">
                                <img src="../../../upload/images/' . $item->img . '" class="img-responsive" />
                            </div>
                        </a>
                        <div class="col-md-80 col-sm-120 col-xs-120 news_text_container">
                            <a href="/main/news/' . $item->id . '">
                                <h2>' . $item->title . '</h2>
                            </a>
                            <p class="news_date">13.02.2016</p>
                            <div class="news_text">
                                ' . ShortNewsHelper::getShortTextNews($item->text, 70) . '
                            </div>
                            <a href="/main/news/' . $item->id . '">
                                <div class="news_button">
                                    <p>Читать подробнее</p>
                                </div>
                            </a>
                        </div>
                    </div>
                    ';
}
?>
        
        <?php 
$this->widget('CLinkPager', array('pages' => $pages, 'header' => false, 'nextPageLabel' => '>', 'nextPageCssClass' => 'goods_next_page', 'prevPageLabel' => '<', 'previousPageCssClass' => 'goods_prev_page', 'selectedPageCssClass' => 'goods_selected_page', 'internalPageCssClass' => 'goods_internal_page', 'maxButtonCount' => 7));
?>
コード例 #2
0
ファイル: index.php プロジェクト: R-thomas/shopMob
                
                
                <?php 
foreach ($news as $n => $text_news) {
    if ($n == 0) {
        echo '<div class="col-md-60 col-sm-60 col-xs-120 content_news_news1">
                                      <a href="/main/news/' . $text_news->id . '"><h3>' . ShortNewsHelper::getShortTextNews($text_news->title, 7) . '</h3></a>
                                      <p class="content_news_date">' . date("j.m.Y", $text_news->date) . '</p>
                                      <p class="content_news_textnews"> ' . ShortNewsHelper::getShortTextNews($text_news->text, 35) . ' </p>
                                  </div>';
    } else {
        if ($n == 1) {
            echo '<div class="col-md-60 col-sm-60 col-xs-120 content_news_news1">
                                      <a href="/main/news/' . $text_news->id . '"><h3>' . ShortNewsHelper::getShortTextNews($text_news->title, 7) . '</h3></a>
                                      <p class="content_news_date">' . date("j.m.Y", $text_news->date) . '</p>
                                      <p class="content_news_textnews">' . ShortNewsHelper::getShortTextNews($text_news->text, 35) . '</p>
                                  </div>';
        } else {
            break;
        }
    }
}
?>
            </div>
        </div>
        <div class="col-md-40 col-sm-120 col-xs-120 content_news_widget">
            <!-- VK Widget -->
            <div id="vk_groups"></div>
            <script type="text/javascript">
            VK.Widgets.Group("vk_groups", {mode: 0, width: "240", height: "260", color1: 'FFFFFF', color2: '2B587A', color3: '5B7FA6'}, 79938946);
            </script>