예제 #1
0
<!-- Go to www.addthis.com/dashboard to customize your tools -->
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-576abf001771b77c"></script>
<style>
ul#others li a {
    color: #000066;
    border-radius: 4px 4px 0 0;
}

ul#others li a:hover {
    color: blue;
}
</style>
<?php 
require_once '../Models/xl_news.php';
$id_news = $_GET['id'];
$xl_slide_db = new xl_news_db();
$result = $xl_slide_db->GetNews($id_news);
$result2 = $xl_slide_db->SelectNews();
//var_dump($result);
?>
	<section id="content">
        <div class="groupProduct">
            <div class="groupProduct-header">
                <div class = "header-news">
                    <?php 
echo $result[0]['name'];
?>
                    
					<!--<script>
                        $(document).ready(function() {
                            new Share(".share-button");
예제 #2
0
파일: news.php 프로젝트: aile54/akachan
    function Getnews()
    {
        $xl_slide_db = new xl_news_db();
        $titles = $xl_slide_db->SelectNews();
        ?>
            <section id="content">
                <div class="groupProduct">
                    <div class="groupProduct-header">
                        <div>
                            Góc Chia Sẻ
                        </div>
                    </div>
                </div>
                <div class="groupProduct-content marginCenter" id="featured_products">
                    		<ul id="ul-products">
					<?php 
        if (count($titles) > 0) {
            foreach ($titles as $title) {
                $details = $title['details'];
                ?>
                            <li style ="width: 47%; margin: 0 20px 0px 0px;">
                                <div class="newsdetails">		
                                    <!--echo '<a href="../Views/News_detail.php?id='.$title['id'].'" -->
                                    <div id = "link-newsdetails"> 
                                        <a href="../Views/News_detail.php?id=<?php 
                echo $title['id'];
                ?>
"
                                        style="color:#000066">
                                            <?php 
                echo $title['name'];
                ?>
                                        </a></br>
                                    </div>
                                    <div class="newsdetails-info">
                                        <div class="newsimage">
                                            <a href="../Views/News_detail.php?id=<?php 
                echo $title['id'];
                ?>
">
                                            	<?php 
                if (strlen($title['image']) > 5) {
                    ?>
                                                	<img src="../<?php 
                    echo $title['image'];
                    ?>
" />
                                                <?php 
                } else {
                    ?>
                                                	<img src="../Templates/Content/images/News/news.png" />
                                                <?php 
                }
                ?>
                                            </a>
                                        </div>
                                        <div class="newsinfo">
                                            <?php 
                echo mb_substr($details, 0, 150, 'UTF-8');
                ?>
                                            <?php 
                if (strlen($details) > 0) {
                    ?>
                                                ... 
                                                <a href="../Views/News_detail.php?id=<?php 
                    echo $title['id'];
                    ?>
" 
                                                style="font-size:12px; ">
                                                 Đọc thêm
                                                </a>
                                                
                                            <?php 
                }
                ?>
                                        </div>                                	
                                    </div>	
                                </div>
                            </li>
                    <?php 
            }
        }
        ?>
                         	</ul>
            	</div>
                <div id="clearbetween">
                </div>
                
            </section>
            <div id="clearbetween">
            </div>
			<?php 
    }