Exemplo n.º 1
0
    function GetNewsList($params=null)
    {
        global $par, $varsline;

        $list = Array();
        $sql="SELECT * FROM $par->news1table WHERE `hide`=0";
        if(isset($params['orderby'])) $sql.=" ORDER BY ".$params['orderby'];
        if(isset($params['start']) && isset($params['itemsinpage'])) $sql.=" LIMIT ".$params['start']." , ".$params['itemsinpage'];
        
        $res = mysql_query($sql);
        while( $line = mysql_fetch_array($res,MYSQL_ASSOC) )
        {
            $list[] = GetNewsItem($line['id'],$line);
        }
        return $list;
    }
Exemplo n.º 2
0
    }
    $url = $row->post_name;
    $url = "news/" . $url;
    $title = $row->post_title;
    $title = utf8_encode($title);
    $date = $row->post_date;
    $date = explode(' ', $date);
    $date = $date[0];
    // Get first 20 preview lines
    $preview = $row->post_content;
    $preview = strip_tags($preview);
    $preview = implode(' ', array_slice(explode(' ', $preview), 0, 20));
    $preview .= "...";
    $preview = utf8_encode($preview);
    $img = "";
    GetNewsItem($url, $author, $title, $date, $preview, $img);
}
?>
					 </ul>
					 
					 <div class="btnContainer">
						<a href="news-archive.php" class="btn" style="margin-top:3em;">News Archive</a>
					 </div>
					 
                  </div>
               </div>
            </section>
		</main>
	 </div>
	 
	 <?php 
Exemplo n.º 3
0
<?
    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);
    }
        
?>
Exemplo n.º 4
0
											<div class="event-date">
												<?php 
    echo $date;
    ?>
						
											</div>
										</div>
									</div>
								</li>
								<?php 
}
$newsData = json_decode(file_get_contents("http://blackcoinsquare.org:8080/php-helpers/newsData.php"));
for ($i = 0; $i < 5; $i++) {
    $item = $newsData[count($newsData) - $i - 1];
    $date = isset($item->date) ? $item->date : "???";
    GetNewsItem($item->url, $item->title, $date);
}
?>
                            </ul>

                            <div class="btnContainer">
                                <a href="news-archive.php" class="btn" style="margin-top:3em;"><?php 
echo NEWS_ARCHIVE;
?>
</a>
								<a href="http://dailyblackcoin.com" class="btn" style="margin-top:3em;" target="_blank">The Daily BlackCoin</a><br><br>
								<i>Note: all data is taken from <a style="color:#9E9E9E;" href="http://blkfeed.com/" target="_blank">blkfeed</a>, a BlackCoin social hub</i>
                            </div>

                        </div>
                    </div>