Location: PHPKode > projects > Mdasx > mdasx/new.php
<?php

/*Vitaly Fedulov leoxs.com
  Downloads mdasx.sourceforge.net
  Version 0.1beta License GNU/GPL       */

require_once ("includes/hawhaw.inc");
require_once ("includes/config.php");
$blogtitle = "Recent posts";
include_once ("includes/header.php");
mysql_connect($dbhost, $dbuname, $dbpass);
@mysql_select_db("$dbname") or die ("MySQL ERROR");
$result = mysql_query("SELECT ID,post_title,post_name FROM `".$prefix."_posts` WHERE post_status='publish' AND post_type='post' ORDER  BY post_date DESC LIMIT $num_rec_post");
while ($row = mysql_fetch_array($result)){
$id = $row['ID'];
$title = $row['post_title'];
$name = $row['post_name'];
$Link = new HAW_link($title,"read.php?m=".$id."&n=".$name,$title);
$Image = new HAW_image("images/default/posts_new.wbmp","images/default/posts_new.gif","->","images/default/posts_new.bmp");
$Page->add_image($Image);
$Page->add_link($Link);
}
mysql_close();
include_once ("includes/footer.php");
?>
Return current item: Mdasx