コード例 #1
0
ファイル: novelty_logic.php プロジェクト: Apxe/Rubin_final
<?
    if ($act=='novelty'  && $id!=0)
    {
        $_logic['content']=Array();
        $_logic['content'] = GetNewsItem($id);
        $_logic['content']['allnewsurl'] = GetSeoUrl('novelty',0);
    }
    
    if ($act=='novelty'  && $id==0)
    {
        $_logic['content']=Array();

        $sql = "SELECT * FROM $par->topmenutable WHERE `url`='/novelty'";
        $res = mysql_query($sql);
        if($line = mysql_fetch_array($res,MYSQL_ASSOC))
        {
            $line = LangProcess($line);
            $_logic['content']['title'] = $line['title'];
            $_logic['content']['text'] = $line['text'];
        }
        
        $newsinpage = 5;
        $_logic['content']['items'] = GetNewsList( Array('orderby'=>'prior DESC', 'start'=>$start, 'itemsinpage'=>$newsinpage)  );
        $sql2 = "SELECT COUNT(id) AS ccc FROM $par->news1table WHERE `hide`=0";
        $linkstr = GetSeoUrl('novelty',0);
	    $_logic['content']['pagerarr']=GetPager($sql2,$linkstr,$newsinpage);
    }
        
?>
コード例 #2
0
ファイル: news.module.php プロジェクト: aboodred1/ArtLabCMS
<div id="news">
<?php 
if ($config["news"] > 0) {
    print GetNewsDetails();
} else {
    print GetNewsList();
}
?>
	<br class="clr" />
</div>